I have a compiled Python 2.6 program on Linux called abc.pyc. If I run
./abc.pyc
It works fine. However, if I rename it to abc (i.e., without the pyc extension), it does not start. It gives an error message:
ImportError: No module named abc
How to run a program without a .pyc extension?
UPDATED:
I want to run the compiled (pyc) version, not the py version
Alternatively, I know that I can compile modules into .so files using Cython, but can I compile my main Python program with what I can run on the Linux platform? If so, then an example of a command line of Cython will be considered.
UPDATED
I posed Keaton's question as a separate question.
mozza source
share