Python vs. Lisp -- please explain

Paul Boddie paul at boddie.org.uk
Tue Feb 21 03:33:05 EST 2006


Delaney, Timothy (Tim) wrote:
> Donn Cave wrote:
>
> > for very long.  If you give me a Python program, you have 3 choices:
> > cross your fingers and hope that I have the required Python
> > interpreter version, slip in a 25Mb Python interpreter install and
> > hope I won't notice, or come clean and tell me that your program
> > needs an interpreter and I should check to see that I have it.
>
> Or use the correct term - a Python Virtual Machine.

Well, yes, I suppose you could have something just interpreting
bytecodes and with no support for parsing and compiling Python the
language - I suppose PyMite [1, 2] and other similar works are like
that.

> The the compiler is built into the VM as opposed to a separate tool
> (like Java) is just an implementation issue. There's nothing stopping
> you from compiling Python source offline and just distributing the
> bytecode (and this is commonly done) - although in that case you are
> usually tied to a specific PVM major version.

Yes, but you can run something like gcj on Java programs and get an
executable which, if I'm not mistaken, doesn't contain any Java VM
whatsoever. There are packagers and other tools for Python which
produce executables, but most of them bundle some kind of bytecode
interpreter, with the possible exception of things like "Python to C"
and, if you're not actually writing Python, Pyrex. However, I believe
that jythonc also produces Java class files with no dependencies on an
embedded VM.

Paul

[1] http://www.python.org/pycon/papers/pymite/
[2] http://wiki.python.org/moin/PyMite




More information about the Python-list mailing list