Good use for Jython

M

Mike Wimpe

Other than being used to wrap Java classes, what other real use is
there for Jython being that Python has many other GUI toolkits
available? Also, these toolkits like Tkinter are so much better for
client usage (and faster) than Swing, so what would be the advantage
for using Jython? or Is Jython really just so that Java developers can
write Java code faster?

Mike Wimpe
 
M

Michael Hoffman

Mike said:
Other than being used to wrap Java classes, what other real use is
there for Jython being that Python has many other GUI toolkits
available? Also, these toolkits like Tkinter are so much better for
client usage (and faster) than Swing, so what would be the advantage
for using Jython?

What ever gave you the impression that Jython was targeted only at
people who wanted to do GUI development?
 
T

Tom Willis

Other than being used to wrap Java classes, what other real use is
there for Jython being that Python has many other GUI toolkits
available? Also, these toolkits like Tkinter are so much better for
client usage (and faster) than Swing, so what would be the advantage
for using Jython? or Is Jython really just so that Java developers can
write Java code faster?

Mike Wimpe

I haven't done anything substatial with Jython yet, but I consder it
to be valuable in areas where you have to do something quick and
dirty, perhaps debug an EJB running on an app server for example.

Bean shell serves the same purpose and the syntax is pretty much Java
so the learning curve isn't as steep for java developers.

I see it as a way of getting around some of the requirements of the
language. If I needed to connect to java systems together and I needed
to do it quickly, and the quality of requirements was less than
adequate, I'd rather write a script(beanshell/jython/groovy) than
booting up eclipse and contributing to the interface cesspool .
 
K

Kent Johnson

Mike said:
Other than being used to wrap Java classes, what other real use is
there for Jython being that Python has many other GUI toolkits
available? Also, these toolkits like Tkinter are so much better for
client usage (and faster) than Swing, so what would be the advantage
for using Jython? or Is Jython really just so that Java developers can
write Java code faster?

I use Jython a lot. I have a background in Java and I am working in a Java shop, but I prefer to
code in Python, so Jython has some appeal:
- Works with existing Java libraries, both in-house proprietary libs and favorite third-party libs.
The third-party libs probably have Python equivalents, but it's nice to be able to keep using some
favorite tools.
- Doesn't add any new requirements to the target machine (just needs the JRE they already have,
Python install not needed) (yes, I know about py2exe)
- No one has to know :) I can ship a jar file (or several) that contains my program, it looks just
like Java.

A recent poster on jython-users had switched from Python to Jython because he preferred Swing over
the GUI toolkits available with Python so I guess there is room for more than one opinion on that point.

Kent
 
S

Sean Blakey

Other than being used to wrap Java classes, what other real use is
there for Jython being that Python has many other GUI toolkits
available? Also, these toolkits like Tkinter are so much better for
client usage (and faster) than Swing, so what would be the advantage
for using Jython? or Is Jython really just so that Java developers can
write Java code faster?

Mike Wimpe

I use an embedded Jython interpreter extensively for the business
logic layer of a Servlet/J2ee application. The back end uses,
Hibernate to connect to the database, so Jython's JavaBean
functionality is very useful for me, vastly simplifying and clarifying
my own logic.

As an added bonus, it is vastly easier to debug and redeploy a Jython
script file into a running system than it is to do the same with a
session EJB.
 
P

peter@clgorg

The only reason i can think of to use it would be for the purpos of using an Applet in a WebPage, as
the Jythonc tool can compile Jython classes to Java byte code.

But if your not in need of an Applet, then youll probably want to go with a normal Python GUI
toolkit like wxPython (or QT or Tkinter....).

Peter

----- Original Message -----
From: "Mike Wimpe" <[email protected]>
Newsgroups: comp.lang.python
To: <[email protected]>
Sent: Tuesday, March 15, 2005 11:54 PM
Subject: Good use for Jython
 
T

Tim Tyler

Mike Wimpe said:
Other than being used to wrap Java classes, what other real use is
there for Jython being that Python has many other GUI toolkits
available? Also, these toolkits like Tkinter are so much better for
client usage (and faster) than Swing, so what would be the advantage
for using Jython? or Is Jython really just so that Java developers can
write Java code faster?

Jython allows Python programmers to access to the large volume of
existing Java code and libraries - and provides access to a ubiquitous
and widely distributed runtime environment.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,900
Latest member
Nell636132

Latest Threads

Top