Spreading the word about Python; ?s and ideas

Greg Ewing greg.ewing at compaq.com
Thu Jul 22 16:53:37 EDT 1999


Isidor wrote:
> 
>   The whole time I was asking myself...you
>   mean I have to *load* something just to change the directory?!

Maybe it would help if certain well-known built-in
modules (sys, os, string...) were pre-imported
into the builtin namespace. You'd still have to
write os.chdir, etc, but at least you wouldn't
have to write import statements for them all the
time.

> Download 15megs to run a 2k script?! 

You have to keep in mind that the 2k script is
so small because it's making use of a huge library
of modules written in Python and C.

Any given script is only going to use a small part
of the library, so you might be able to get the user
just to download the Python core and include the
required standard modules with the script. But
then if they download several scripts there is
likely to be some duplication.

It should be possible to produce an ultra-minimal
Python runtime that's quite small. The executable
and its DLLs only come to about 170K on Windows.
If you leave out the documentation, the rest is
mostly library .py files, most of which are relatively
rarely used.

A minimal runtime could perhaps include only the
most commonly used library modules, the rest being
stubs which display a message telling you what you
need to download.

Greg




More information about the Python-list mailing list