情况是:
python嵌入到ios应用程序(libpython2.7.a)中,所有逻辑都由python编写,一些api支持通过swig wrap调用,如果python是py(c,o)一切都很好但是太慢了,我想加快速度比我使用 cython 编译到 .c 源而不是 .so,它似乎加载但
找不到“__文件__”定义
这是调用堆栈:
[CGPLoad.py] load from file error [Error Message:
exceptions.NameError:name '__ file __' is not defined
Traceback:
init CGPLoad (build/CGPLoad.c:3054): CGPLoad.py(# 19)
init LogInOutShell (build/LogInOutShell.c:3089): LogInOutShell.py(# 20)
init CommonToolShell (build/CommonToolShell.c:6560): CommonToolShell.py(# 19)
init GameWorld (build/GameWorld.c:2516): GameWorld.py(# 19)
init IPY_GAMEWORLD (build/IPY_GAMEWORLD.c:27700): IPY_GAMEWORLD.py(# 28)
IPY_GAMEWORLD.swig_import_helper (build/IPY_GAMEWORLD.c:4304): IPY_GAMEWORLD.py(# 18)
]
蟒蛇源是:
fp, pathname, description = imp.find_module('_IPY_GAMEWORLD', [dirname(__ file __)])
什么问题,如何解决?