JPython is a new implementation of the Python programming language which is designed to run on SUN's Java(tm) Platform. It consists of a compiler to compile Python source code down to Java bytecodes which can run directly on a JVM, a set of support libraries which are used by the compiled Java bytecodes, and extra support to make it trivial to use Java packages from within JPython.
I'm eager to ensure that JPython remains as compatible with CPython (the current implementation) as possible. Nevertheless, there are a number of differences between the two implementations that are unlikely to go away. These range from the trival - JPython's code objects don't have a co_code attribute because they don't have any Python bytecodes; to the significant - JPython uses Java's true garbage collection rather than Python's reference counting scheme.
Python has never really had much of a language definition beyond it's current C-based implementation. The existence of JPython changes that for the first time and will hopefully lead to a much clearer sense of what Python the language is; independent of any specific implementation. Stay tuned for more details...
I've started working (with Guido's input) on preparing a version of Python's regression test that would be appropriate for new implementations of the language. This is a good first step towards defining what parts of Python are essential and which are incidental.
The good news is that the 1.0 beta 1 release of JPython supports the large majority of the standard Python library. The bad news is that this has moved so rapidly I've been unable to keep up with the documentation.
If you want to use a standard Python module, just try importing it. If it that works you're probably all set. You can also do a dir on the modules to check the list of functions it implements.
If there is some standard Python module that you have a real need for that doesn't work with JPython yet, please send me mail and I'll see what I can do about it.
At IPC-6 I reported that I had speed equal to CPython 1.4 on the pystone benchmark. The current release doesn't include two of the optimizations that I use in my own version of the system so it will be about 15% slower than CPython 1.4. These optimizations will be added back into the distribution when I have time to test them more carefully. Finally, the 1.5 release of CPython is now available. Guido has succeeded in making this release about 2x faster than the 1.4 release. Therefore, JPython is currently about 2.5x slower than CPython 1.5.
The speed of JPython is tied very tightly to the speed of the underlying JVM. The benchmark results that I report are all using Microsoft's JVM from Internet Explorer 4.0. The next fastest JVM that I have used is almost a factor of 2 slower than this. At some point I'll want to collect a set of scores comparing PyStone performance on a wider variety of JVM's.
Finally, pystone is not the last word in benchmarking. At the moment I'm much more concerned with making JPython complete and correct than with performance. After the 1.0 final release goes out (early 1998) I will revisit performance issues both to examine better benchmark's for comparing JPython and CPython (as well as other scripting languages for the JVM) and work at optimizing JPython's performance.
If you are using SUN's Java VM (or a derived VM) the virtual machine sets a default memory limit of 16 MB. This can be very confusing when you are running on a machine with 128 MB of RAM and you see an OutOfMemoryError after having used only 17 MB.
You can increase this memory limit by adding the following switch to the call that invokes the Java VM (you need to modify the jpython launch script):
jre -mx32m <...>
This will set your upper memory limit to 32 MB. Obviously, higher limits should be used if required by your program - and supported by your computer..
There are several several differences between JPython and CPython that wil probably never go away. These differences are primarily related to underlying differences between the C and Java programming languages/environments.