14 Nov 2002 16:24:40 -0700
Now that I have used these tools internally for a few months I am
pleased to announce the first public release of cx_Freeze, a set of
utilities for freezing Python scripts into executables using many of the
techniques found in Thomas Heller's py2exe, Gordon McMillan's Installer
and the Freeze utility that ships with Python itself.
They are available at
Why did I go to the trouble of creating another set of utilities when
these three utilities already existed? The Freeze utility that comes
with Python itself requires a source distribution, a C compiler and
linker which makes for a complex environment for creating executables.
In addition, this method is very slow for creating executables as
compared to the other methods. Py2exe and Installer both use an import
hook at runtime which means that the development environment and the
runtime environment are considerably different. In addition, py2exe is
only designed to work in the Windows environment and I had needs for
How does it work? A base executable is created which contains code for
unpacking the list of frozen modules, starting up the Python interpreter
and passing control to the script which is being frozen. When a script
is frozen, the script is searched for all references to modules and
these modules are then byte compiled and written to the end of the base
executable. If the modules that are referenced are extensions written in
C, these modules must be included in the path in which the frozen
executable is deployed.
Comments and suggestions welcome.
Distinctive Software. Real People.
Suite 200, 10216 - 124 Street NW
Edmonton, AB, Canada T5N 4A3
Phone: (780) 454-3700
Fax: (780) 454-3838