Re: Python and Jython

Discussion in 'Python' started by Mulugeta Maru, Jun 26, 2003.

  1. I must say thank you very much. Very helpful explanation and advice.


    ----- Original Message -----
    From: "Michael Chermside" <>
    To: <>; <>
    Sent: Tuesday, June 24, 2003 7:49 AM
    Subject: Python and Jython


    > Mulugeta Maru writes:
    > > My background is Java. I would like to know the difference between

    Python
    > > and Jython. Are they different languages? Should I learn Python first

    and
    > > then Jython? The reason I would like to learn the language is to use it

    with
    > > Java.

    >
    > Jython and Python are the *same* language. This doesn't mean that they
    > are identical in all respects... there are several important differences.
    > But that's a lot like using Netscape's javascript versus Microsoft's...
    > (back before EMCAscript was standardized) if you stick to the basic things
    > they'll work the same way in both, but you can find lots of differences

    lurking
    > in the corners.
    >
    > The most important differences are the truly fundamental ones that

    motivated
    > having two different implementations. CPython (the proper name for the

    C-based
    > version of Python, although people usually just call it "python") is

    written in
    > C. This means that it can be EXTENDED in C, and there are lots of useful
    > extensions (and some built into the standard distribution) that exist for
    > CPython which allow OS-specific features like Microsoft com objects and

    unix
    > interrupts, or to c libraries (several windowing libraries for instance),

    or
    > c's speed (Numeric and libraries for doing scientific computations).

    Jython has
    > none of these.
    >
    > Meanwhile, Jython runs on the java virtual machine (although that isn't

    really
    > an advantage on portability, since CPython is more portable than the JVM).

    The
    > most important feature of Jython is that Jython progams can call Java

    objects,
    > Java programs can call Jython objects, and the Jython can be compiled into

    100%
    > pure (compiled) Java code! The level of inter-language integration is

    really
    > astounding, and makes Jython the perfect choice for scripting Java

    programs,
    > interactively examining Java code, and so forth. Also, it means that

    Jython
    > programs can take advantage of Java's huge libraries. They have fewer OS-
    > specific features, but lots of useful things like JDBC, etc.
    >
    > The other difference that I've noticed is that a lot more people work on
    > CPython than are working on Jython. As a result, CPython is a couple of
    > versions ahead of Jython and keeps adding new features. Hopefully Jython

    can
    > attract more volunteers and manage to keep up (because some of the new

    features
    > are pretty nice).
    >
    > There are, of course, some syntactic differences... the page
    > http://www.jython.org/docs/differences.html will list some, but it is very
    > dated since CPython has changed a lot in since version 2.0 -- for

    instance, it
    > says that CPython lacks circular garbage collection, but that has since

    been
    > added. Nevertheless, it's a useful guide.
    >
    > Since what you want to do is mostly to use Python with Java, I'd suggest

    that
    > you start out with Jython. You'll find that you can move to CPython

    anytime,
    > and that nearly everything you learned in Jython will work perfectly

    (except
    > that which depended on Java libraries).
    >
    > -- Michael Chermside
    >
    >
    Mulugeta Maru, Jun 26, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Curran

    Re: Python and Jython

    Peter Curran, Jun 24, 2003, in forum: Python
    Replies:
    0
    Views:
    683
    Peter Curran
    Jun 24, 2003
  2. Borcis
    Replies:
    1
    Views:
    373
    Borcis
    Dec 22, 2003
  3. David McNab
    Replies:
    0
    Views:
    485
    David McNab
    Apr 9, 2004
  4. Divya Prakash
    Replies:
    0
    Views:
    430
    Divya Prakash
    Dec 19, 2006
  5. Pinegar, Kent T

    FW: [Jython-users] Jython Licensing Question

    Pinegar, Kent T, Jul 24, 2008, in forum: Python
    Replies:
    0
    Views:
    346
    Pinegar, Kent T
    Jul 24, 2008
Loading...

Share This Page