the situation is:
python embed in ios app (libpython2.7.a), all logic is writed by python, some api support to call though swig wrap, if the python is py(c,o) everything is ok but too slow, i want to speed up than i use cython compile to .c source than .so, it seem load but
can't find "__ file __" define
here is the call stack:
[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)
]
the python source is:
fp, pathname, description = imp.find_module('_IPY_GAMEWORLD', [dirname(__ file __)])
what's the problem, how to fix it?