RELEASED Python 2.3.1

Thomas Heller theller at
Thu Sep 25 17:48:11 CEST 2003

Dave Brueck <dave at> writes:

> I've been working on a simplistic implementation of such a run-time
> for my own projects. It's functional but very experimental (read: does
> what I need and not much else) and not well-documented or anything,
> but if anybody wants to play with what I've done so far just drop me a
> line. It's nice and small:
>   19,530
>   18,944 pycb.exe
>    1,908 pycbcom.tlb
>   19,456 pycbw.exe
>  445,952 python23.dll
>  749,092
>    3,072 w9xpopen.exe
>   20,480 _ctypes.pyd
> (1.2 MB total - has _socket, select, _winreg, etc built in to the main dll)


Is the python23.dll compressed,or did you leave features out?

> It registers itself as an ActiveX control so that from Internet
> Explorer you can have a web page query to see if the run-time has been
> installed (so that, e.g., you can have the user download the
> app+runtime or just the app).
> Small download size is a primary goal, with a close second being very
> little differentiation between the dev (.py) and release (.exe)
> environments (which has bitten me many times in the past). Thus I
> don't run python.exe any more at all for projects that will end up
> being distributed this way.
> The library also registers the .pycb extension with Windows (pycb =
> "Python code bundle") so that you can distribute your code in a small
> app.pycb file that, from the user's perspective, is an
> "executable". For example, for a personal project I just completed the
> entire distribution consisted of:
> venster.pycb (82k)
> main.pycb (15k)
> Under 100KB is not bad for a GUI app! :) 
> The .pycb format is basically ZIP + AES encryption, and pycb uses the new 
> import hooks in 2.3 to handle it. The encryption is just to keep honest 
> people out; anybody with the right combination of smart and bored could 
> figure out how to circumvent it.

Mark Hammond and I have also been hacking on a new py2exe version which
is somewhat similar, available in a CVS sandbox subdirectory.

It creates small exe-files (gui, console, service, or com), containing
the main script as marshaled code objects, together with a zipfile
containing the needed python modules, shared between these
exe-files. The zipfile is imported using the zipimport feature of 2.3.

The code is factored out so that it should even possible to add
encryption for the zipfile's contents, given that a customized
zipimporter is used.


More information about the Python-list mailing list