我有一个名为 caller.py 的 Python 文件,位于 C:\Temp。我还有另外两个 Python 文件:local_testlib.py
位于 C:\Temp 和testlib.py
C:\Temp\MyLibs。
我正在尝试在 Wing IDE Pro 中导入这两个文件。
import sys
sys.path.append(r'C:\Temp\MyLibs')
import testlib #located in C:\Temp\MyLibs
import local_testlib #located in C:\Temp
#check suggestions by Wing
local_testlib. #get suggestions as list of variables etc. from the file
testlib. #don't get any suggestions
print testlib.myvar #get variable value printed OK
我只得到 local_testlib 的建议,没有得到 testlib 的建议(见下图)。我确实可以访问 testlib.py 中的变量(因此它被正确导入)。我应该做哪些调整才能完成这项工作?