python - __init__.py seemingly not working -
new python. i'm on windows , python2.7.
i have confirmed directory setup in pythonpath looking in sys.path idle.
import sys print(sys.path)
this shows me c:\users\owner\documents\pythonprojects in path. furthermore in directory have .py file can imported idle.
the trouble c:\user\owner\documents\pythonprojects\testpackage\test.py not loading. error importerror:no module named testpackage.test.
i have tried empty __init__.py
__init__.py
trivial code inside. __init__.py
in pythonprojects folder should be. why getting error?
because should in testpackage\
.
Comments
Post a Comment