By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,017 Members | 1,158 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,017 IT Pros & Developers. It's quick & easy.

What is Jython?

P: n/a
Hello ..

I would like to know more about Python and Jython?
What is the difference between both of them?
What is the future for Jython and which are the areas where it is
used?

Swot

Nov 1 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
sa*****@gmail.com schrieb:
Hello ..

I would like to know more about Python and Jython?
What is the difference between both of them?
What is the future for Jython and which are the areas where it is
used?
Bad google day?

http://www.jython.org/

"""
What is Jython?

Jython, lest you do not know of it, is the most compelling weapon
the Java platform has for its survival into the 21st century:-)

—Sean McGrath, CTO, Propylon

Jython is an implementation of the high-level, dynamic, object-oriented
language Python seamlessly integrated with the Java platform. The
predecessor to Jython, JPython, is certified as 100% Pure Java. Jython
is freely available for both commercial and non-commercial use and is
distributed with source code. Jython is complementary to Java and is
especially suited for the following tasks:

* Embedded scripting - Java programmers can add the Jython
libraries to their system to allow end users to write simple or
complicated scripts that add functionality to the application.
* Interactive experimentation - Jython provides an interactive
interpreter that can be used to interact with Java packages or with
running Java applications. This allows programmers to experiment and
debug any Java system using Jython.
* Rapid application development - Python programs are typically
2-10X shorter than the equivalent Java program. This translates directly
to increased programmer productivity. The seamless interaction between
Python and Java allows developers to freely mix the two languages both
during development and in shipping products.

There are numerous alternative languages implemented for the Java VM.
The following features help to separate Jython from the rest:

* Dynamic compilation to Java bytecodes - leads to highest possible
performance without sacrificing interactivity.
* Ability to extend existing Java classes in Jython - allows
effective use of abstract classes.
* Optional static compilation - allows creation of applets,
servlets, beans, ...
* Bean Properties - make use of Java packages much easier.
* Python Language - combines remarkable power with very clear
syntax. It also supports a full object-oriented programming model which
makes it a natural fit for Java's OO design.
"""
Diez
Nov 1 '07 #2

P: n/a
Ant
On Nov 1, 6:54 am, saru...@gmail.com wrote:
....
I would like to know more about Python and Jython?
What is the difference between both of them?
What is the future for Jython and which are the areas where it is
used?
Jython is an implementation of Python for the Java VM. Currently it
stands as equivalent to Python v2.2, but progress has been rapidly
accelerating over the last year or so, and the next version will
probably be targeted at 2.5 AFAIK.

Jython also has access to all of the Java standard libraries (or any
Java libraries on the classpath for that matter.)

Jython is currently significantly slower than Python.
>From my experience Jython is most typically used as an embedded
extension/scripting language for Java applications in areas where
rapid development/change is required. This includes such areas as
scripting business logic, writing unit or functional tests etc. Take a
look at http://antroy.blogspot.com/2007/04/s...and-jemmy.html
for an example of how I have successfully used Jython for Swing
testing. More information can be found on http://www.jython.org/Project/index.html

Cheers,

--
Ant.

Nov 1 '07 #3

P: n/a
On Nov 1, 10:37 am, Ant <ant...@gmail.comwrote:
On Nov 1, 6:54 am, saru...@gmail.com wrote:
...
I would like to know more about Python and Jython?
What is the difference between both of them?
What is the future for Jython and which are the areas where it is
used?

Jython is an implementation of Python for the Java VM. Currently it
stands as equivalent to Python v2.2, but progress has been rapidly
accelerating over the last year or so, and the next version will
probably be targeted at 2.5 AFAIK.

Jython also has access to all of the Java standard libraries (or any
Java libraries on the classpath for that matter.)

Jython is currently significantly slower than Python.
From my experience Jython is most typically used as an embedded

extension/scripting language for Java applications in areas where
rapid development/change is required. This includes such areas as
scripting business logic, writing unit or functional tests etc. Take a
look athttp://antroy.blogspot.com/2007/04/swing-testing-with-jython-and-jemm...
for an example of how I have successfully used Jython for Swing
testing. More information can be found onhttp://www.jython.org/Project/index.html

Cheers,

--
Ant.
On Nov 1, 10:37 am, Ant <ant...@gmail.comwrote:
....
Jython is currently significantly slower than Python.
....
Not according to this : http://blogs.warwick.ac.uk/dwatkins/...el_python_1_2/

Nov 1 '07 #4

P: n/a
Ant
On Nov 1, 11:37 am, Ze'ev <zeevb.pub...@gmail.comwrote:
....
...Jython is currently significantly slower than Python.

...
Not according to this :http://blogs.warwick.ac.uk/dwatkins/...parallel_pytho...
Well I'm damned - I thought that I'd be writing about this being a
parallel example, and Java (and hence Jython)'s better threading
support. Decided to run a few of my old "mathchallenge" scripts
through both Python and Jython, and on some of the examples Python was
running almost 4 times slower...

So that's parallel processing and mathematical processing that seems
faster in Jython. It's be interesting to see a proper comparison of
how different types of program run.

The VM startup overhead is much slower mind, but then that's only an
issue for very small programs.

Cheers,

--
Ant.

Nov 1 '07 #5

P: n/a
Ant
On Nov 1, 1:23 pm, Ant <ant...@gmail.comwrote:
On Nov 1, 11:37 am, Ze'ev <zeevb.pub...@gmail.comwrote:
...
...Jython is currently significantly slower than Python.
...
Not according to this :http://blogs.warwick.ac.uk/dwatkins/...parallel_pytho...
...
So that's parallel processing and mathematical processing that seems
faster in Jython. It's be interesting to see a proper comparison of
how different types of program run.
Simple rexex processing of a large log file on the other hand was 10x
faster in Python than Jython, so I guess it depends on what you want
to achieve.

--
Ant

Nov 1 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.