的情況是:在IOS應用程式(libpython2.7.a)蟒「__file__」沒有定義
蟒嵌入,所有邏輯由蟒所著,一些API支持,雖然痛飲渦卷調用,如果蟒被PY(C,O)一切正常,但太慢,我想加快比我用用Cython編譯成.c的源代碼比。所以,它似乎負載,但
can't find "__ file __" define
這裏是調用堆棧:
[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 __)])
什麼問題,如何解決?
看起來你有__'和'FILE'之間'空間。 – Kevin
呃...如果靠近它不能顯示「__」,那是「__file__」 – sentball