python unable to import module -


i have program set using packages followed:

-base     ---init.py     ---base_class.py -test     ---init.py     ---test.py 

when import statment from base.base_class import baseclass in test.py error when running

    base.base_class import baseclass importerror: no module named base.base_class 

i can't figure out why can't import module.

at top of test.py add

import sys sys.path.append("..") 

base not folder on path...once change should work

or put test.py in same folder base. or move base somewhere on path


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -