JPython?
Dan Star
danstar at execpc.com
Wed Oct 13 19:19:12 EDT 1999
Thanks for the clarification.
--Dan
"Barry A. Warsaw" wrote:
>
> >>>>> "DS" == Dan Star <danstar at execpc.com> writes:
>
> DS> Let me see if I am understanding what JPython is. Is it a
> DS> just-in-time compiler that translates python code to java
> DS> byte-code so that the python code can run in a WEB browser
> DS> that supports java?
>
> Sort of. Yes, part of what it does is translate Python source code to
> Java bytecode, dynamically loading said bytecode into your JVM, and
> executing it. It isn't limited to a browser, and in fact works well
> with most 1.1 and 1.2 JVMs (modulo your favorite JIT bugs).
>
> DS> If so, I would assume this places many restricitions on the
> DS> Python language elements you can use.
>
> Actually it doesn't. I think it's a testament to JimH that JPython
> implements very nearly the same language spec that CPython does. For
> a mostly up-to-date comparison, please see
>
> http://www.jpython.org/docs/differences.html
>
> Most of these are IMO mostly below the radar of the average Python
> hacker. The most significant difference is in the libraries.
> Anything that's written in pure Python should work the same in both
> implementations. CPython of course has a host of built-in modules
> implemented in C. Some of these have been ported to Java and are
> available in JPython, but not all (contributions welcome!). Of course
> JPython has access to the vast array of Java libraries, which CPython
> does not.
>
> DS> Or is JPython a seperate implementation of Python with its own
> DS> language set?
>
> JPython is a completely separate implementation, but it should feel
> very natural to any Python programmer. It is interesting how this
> second implementation helps to delineate exactly what is part of
> the Python language definition, and what are implementation details.
>
> Hope that helps,
> -Barry
More information about the Python-list
mailing list