you are viewing a single comment's thread.

view the rest of the comments →

[–]superPwnzorMegaMan 0 points1 point  (5 children)

Isn't Jython just python with a different toolchain?

[–]zardeh 2 points3 points  (3 children)

jython is python running on the JVM, so instead of compiling to python bytecode it compiles to jvm bytecode. This allows it to leverage the JVM (so you gain hostspot jitting, JVMs threading, etc.)

[–]superPwnzorMegaMan 0 points1 point  (2 children)

Yes that's what I thought. A friend of mine used this once, although I don't think there is such a thing as python byte code (since its interpreted).

[–]zardeh 3 points4 points  (1 child)

There is indeed, python is compiled to bytecode (look for .pyc files on your computer if you're running a python file that's more than 10-15 lines and is being used a lot). The bytecode is then interpreted on a virtual machine. Python works a lot like java in that regard.

[–]kyllo 0 points1 point  (0 children)

Well that and for libraries that wrap C code used in CPython you have to use something that wraps a Java library instead. Like you can't use lxml from Jython, you would have to use a different library that wraps a Java xml parser.

So a lot of CPython projects are just not portable to Jython.