How do I achieve from . import x
(import module x from the current package), using __import__
?
Here are some attempts that failed:
>>> __import__('.', fromlist=['x'])
ValueError: Empty module name
>>> __import__('.x')
ValueError: Empty module name
How is this done using __import__
?