python sys.path.append

可以把自己的模块路径给加到当前模块扫描的路径里,可以避免因为找不到模块而报错。

sys.path.append('你的模块的名称')

1 import sys 
2 sys.path.append('f:\\python\works')