Python & Linux ?

Eric Lee Green eric at badtux.org
Tue May 22 10:50:22 EDT 2001


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 22 May 2001 06:51:53 GMT, Peter Moscatt <pmoscatt at bigpond.net.au> wrote:
>I have just migrated from Win98 over to Linux.  My programming platform 
>under Win98 was VB.
>Now in Linux, I have decided to program using the Python platform.
>I have bought myself a get started book and from what I can gather - 
>Python is a Interpreter and not a Compiler, therefore only being able to 
>develop scripts instead of installable programs.
>
>Have I got it all wrong here ??

Yes. No.

Python compiles down to byte codes. These byte codes can be packaged
with the run-time to produce a distributable/installable program. At
EST (R.I.P.) we created a network backup system by gluing together a
bunch of "C" code (mostly pre-existing) with Python. Everything time
or space constrained was "C", everything that was not time or space
constrained ended up in Python...  after all, Python is much faster
than the seek speed on a tape drive, and we could write about the same
# of lines of Python code per day as we could write of "C" code -- but
what took 250 lines of Python took 1200 lines of "C" (that was the
protocol stack for the tape server/backup agent communications, which
was space constrained on the backup agent side and thus "C" there, but
which was Python on the tape server side... I was frankly flabbergasted to
see just how much more compact the Python was). To distribute the resulting
program, we simply distributed a tarball which had an "install.sh" script and
the tarball of the program itself in it, complete with our customized
Python runtime. We could have used the 'freeze' mechanism also, but we
detirmined that this caused us some problems due to the way we handled forking
off modules. 

Anyhow, the net result: you CAN create commercial programs in Python without
giving away your source code. You do need to distribute a hefty runtime
with the program, but (shrug) past a certain point that's not a problem --
given that our software had a "footprint" of around 20 megabytes with all
the other stuff that made it up, the Python runtime size was not an issue. 


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7Cnuh3DrrK1kMA04RAsFiAKCQ36QW+U3AoXq927D4lnOFUAZolQCfdG1z
7/iEAE1FZdf6whLQlWf7yx0=
=qBv6
-----END PGP SIGNATURE-----



More information about the Python-list mailing list