I have a module like below and I want to include a function from __init__.py in myfile.py
/mymodule
/__init__.py
/myfile.py
The init is
import mymodule.myfile
myInt = 5
def myFunction():
print "hey"
and the myfile file
from mymodule import myFunction
from mymodule import myInt
...
So the myInt include works but not the myFunction one. Do you have an idea why?
Thanks
EDIT
The error message is ImportError: cannot import name myFunction
ImportError?myIntandmyFunctionto a separate nested module.myfileisn't runnable, and I don't think it would produce the error you've posted if you removed the...(though I haven't tested it yet).import mymodule.myfilefrom the__init__.pyfile.