I tried to run a python code, say myfile.py
(also tried to rename it as myfile.pyx
) as follows:
import pyximport
pyximport.install(setup_args={"script_args":["--compiler=mingw32"]},
reload_support=True)
import myfile
myfile.mycode()
I am using PyCharm. The code seems to have run fine without any error and even gave me correct results on the Python Console within PyCharm.
However no pyd
(or pxd
) files were generated. How can I know if my code (myfile.mycode()
) ran via Cython or via regular Python?
I am using Python 3.4, Cython 0.21.2.
Thanks
When using pyximport it will generate a temporary
pyd
file which is not in the working directory. You probably want to build asetup.py
which will look something like:which you can compile using: