Compile python executable only for package deployment on Linux

King animator333 at gmail.com
Tue Jul 20 13:42:16 EDT 2010


Hi Stefan,

Well, the idea is similar to package tools like pyinstaller or
cx_freeze. There approach is slightly different then what I intend to
do here.

You have to pass the name of the script to python executable("python
main.py") in order to execute it. What I mean here is to create python
executable using python executable source code only(not compilation of
entire python using source code) and insert "main.py" contents in
source code(hardcoded) and produce a new executable.

When you run that executable, it should run the "main.py", which was
hard coded while building using fixed string or any other method. The
executable is actually a modified version of python executable. It
won't take any argument because we'll rip that piece of code out.

Hope this will clear out.

Cheers

prashant




More information about the Python-list mailing list