Creating executable programs with freeze

It's also possible to create an executable Python program that will run on machines that don't have Python installed by using the freeze tool. You'll find the instructions for this in the Readme file in the freeze directory in the Tools subdirectory of the Python source directory. If you're planning to use freeze, you'll probably need to download the Python source distribution.

In the process of "freezing" a Python program, you create C files, which are then compiled and linked using a C compiler, which you need to have installed on your sys tem. It will run only on the platform for which the C compiler you use provides its executables. Note that it will still be possible for someone to reverse-engineer your Python code from the resulting output. This also doesn't always work in a straightforward manner. This is one situation where you may end up needing to obtain support from the Python newsgroup, depending on the specifics of your application and which C compiler you're using. When you have your executable, it's generally robust.

Was this article helpful?

0 0

Post a comment