def __hello_world(*args, **kwargs):
.....
and I tried
from myfile import __helloworld
I can import the non private one.
How do I import private methods?
Thanks.
I am now using a single underscore.
Traceback (most recent call last):
File "test.py", line 10, in <module>
from myfile.ext import _hello_world
ImportError: cannot import name _hello_world
in my test.py
sys.path.insert(0, os.path.abspath(
os.path.join(
os.path.dirname(__file__), os.path.pardir)))
from myfile.ext import _hello_world