473,372 Members | 1,606 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,372 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 3582
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,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.