How to use import statement for custom modules in Python -
i new python programming , writing simple helloworld program using python 3.3 on windows environoment.the helloworld program saved hello.py. how can use in module. tried sys.path.append , give path of save file not working. can tell me have set environment variable in windows xp
thanks.
use way:
import sys then:
sys.path.insert(0,"x") where x directory want import from.
after need import custom module:
import x thats all.
Comments
Post a Comment