Python 2.0

Helge Hess helge at mdlink.de
Thu May 27 21:18:02 EDT 1999


Paul Moore wrote:
> 
> How would I embed Python in a C application, without a C API? 

Java has JNI which also allows embedding in C applications. This works
quite well for me (at least as good as embedding, personally I even like
it a bit more).

> And how
> would I distribute a C application with embedded (Java-) Python to
> machines with no JVM, assuming I don't want to (or don't have the
> capability to) distribute a JVM.

What's the difference between distributing a JVM or a PyVM ? This is
pretty much the same. Java bytecode also has the advantage that native
compilers are becoming real, eg the gcj compiler of Cygnus.

Maybe Python could use a lightweight/extended JVM, that is, Python could
use Java bytecodes but the JVM native interface could be done more (C)
Python like. This way one could have shared code between (C)Python and
JPython.

Hm, anyway ...
  Helge




More information about the Python-list mailing list