RELEASED Python 2.3.1

Dave Brueck dave at pythonapocrypha.com
Wed Sep 24 10:49:06 EDT 2003


On Thursday 25 September 2003 08:08 am, Terry Reedy wrote:
> > "Cousin Stanley" <CousinStanley at hotmail.com> writes:
> > >     Would it be feasible to eliminate the Python Docs
> > >     from the standard distribution and always download
> > >     separately if desired ????
> > >
> > >     This would eliminate downloading the docs twice
> > >     if the user wants the separate doc files and provide
> > >     a leaner download for non-programming Python users
> > >     that will never develop anything in Python themselves
> > >     but who want a run-time environment only ....
>
> I agree that a separate Windows run-only distribution (including .pyc
> instead of .py files) 

FWIW, shipping the .py and _not_ the .pyc has one advantage in that the .py's 
tend to compress better. Combined with zipimporters in 2.3 this can result in 
a nice, small run-time.

> would be a good idea.  But someone has to
> volunteer the time or money to make it happen.  The current release
> procedure is still being refined and documented by the current
> volunteers.

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 ctypes.zip
  18,944 pycb.exe
   1,908 pycbcom.tlb
  19,456 pycbw.exe
 445,952 python23.dll
 749,092 python23.zip
   3,072 w9xpopen.exe
  20,480 _ctypes.pyd

(1.2 MB total - has _socket, select, _winreg, etc built in to the main dll)

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.

-Dave





More information about the Python-list mailing list