473,386 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

What is Jython?

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
5 3583
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Harald Kirsch | last post by:
Jython does not seem to care about PYTHONPATH: ruddigore:jython-2.1) setenv PYTHONPATH blarg ruddigore:jython-2.1) ./jython Jython 2.1 on java1.4.2-beta (JIT: null) Type "copyright", "credits"...
4
by: Michael Chermside | last post by:
Ype writes: > For the namespaces in Jython this 'Python internal thread safety' > is handled by the Java class: > > http://www.jython.org/docs/javadoc/org/python/core/PyStringMap.html > > which...
53
by: Paul Rubin | last post by:
I've been approached about writing a Windows app which will need a really professional looking GUI. Forget TKinter, this has to actually look good (real artists will be available to get the visual...
2
by: Maboroshi | last post by:
Just thought I would let everyone know of my Jython Forum I couldn't really find one specific to Jython so I set this up if anyone wants to contribute anything visit http://www.pacificflame.com ...
4
by: angel | last post by:
A java runtime environment includes jvm and java class (for example classes.zip in sun jre). Of course jython need jvm,but does it need java class. Thanx
7
by: Jan Gregor | last post by:
Hello I found that jython catches exact java exceptions, not their subclasses. Is there some way to get around this limitation (or error) ? My program has class representing database source...
1
by: scott | last post by:
I installed darwinports and did a "sudo port install jython" ------------------------- scott$ which jython /opt/local/bin/jython ------------------------- Jython works in interactive...
12
by: Mark Fink | last post by:
I wrote a Jython class that inherits from a Java class and (thats the plan) overrides one method. Everything should stay the same. If I run this nothing happens whereas if I run the Java class it...
3
by: donkeyboy | last post by:
All, I'm having issues installing Jython on Windows XP. I've looked on the web and this newsgroup but to no avail. Any suggestions? The shell listing is below: NB I've got Cygwin installed,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.