我有一个目录,其中有两个.py
文件在我的C:\Python27\word_data
调用main.py
和gethtml.py
.
我想从该文件中导入gethtml.py
我的main.py
, print def
,我试图这样做:
import gethtml
print gethtml.getHtmlText()
当我在 Python shell 中运行它时,出现错误:
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
execfile("word_rank/main.py")
File "word_rank/main.py", line 3, in <module>
import gethtml
ImportError: No module named gethtml
我错过了什么?