Questions tagged [jython]

Jython is an open-source implementation of the Python programming language in Java. Use this tag for questions specific to this implementation, general Python questions should just be tagged with "python".

Jython is an open-source implementation of the Python programming language written in Java. It is seamlessly integrated with Java, in that it can import and use any Java class. Jython is extensively used as a official scripting language for all WebLogic Server administration tasks.

Jython is also used for administrative scripting for IBM's WebSphere Application Server through the Wsadmin client.

Helpful References

2784 questions
38
votes
8 answers

jdbc: Get the SQL Type Name from java.sql.Type code

I have an array with Field Names and jdbc Type codes. (Those int codes that you can find in http://download.oracle.com/javase/1.4.2/docs/api/constant-values.html#java.sql.Types.BIT I use a level 4 Driver. I can't figure out how to ask the driver…
AndreasT
  • 9,417
  • 11
  • 46
  • 60
37
votes
6 answers

How can I call scikit-learn classifiers from Java?

I have a classifier that I trained using Python's scikit-learn. How can I use the classifier from a Java program? Can I use Jython? Is there some way to save the classifier in Python and load it in Java? Is there some other way to use it?
Thomas Johnson
  • 10,776
  • 18
  • 60
  • 98
34
votes
5 answers

Groovy advantages over Jython or Jruby?

Why would I choose to use Groovy when I could use Jython or Jruby? Does the language provide any inherent advantages to make up for the fact that Jython and Jruby skills are applicable to their parent languages outside of the JVM? Keep in mind that…
James McMahon
  • 48,506
  • 64
  • 207
  • 283
34
votes
4 answers

How can I make the PyDev editor selectively ignore errors?

I'm using PyDev under Eclipse to write some Jython code. I've got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ISubInterface The problem is that PyDev will always…
Pridkett
  • 4,883
  • 4
  • 30
  • 47
34
votes
4 answers

Automated Python to Java translation

Is there a tool out there that can automatically convert Python to Java? Can Jython do this?
Victor Noagbodji
  • 553
  • 1
  • 5
  • 7
31
votes
10 answers

What is Jython and is it useful at all?

I know Python, but what is Jython? When will I need Jython? What are the drawbacks? I assume it is slow? Please detail it out! thanks.
TIMEX
  • 259,804
  • 351
  • 777
  • 1,080
31
votes
1 answer

Using Jython through IPython: is readline still an issue?

I'd like to use the Jython interpreter with IPython, so that I could use things like tab completion and perhaps the IPython notebook. The IPython FAQ site steps around whether this is possible. I have two questions: Say Jython could work with…
fitze
  • 321
  • 3
  • 4
28
votes
4 answers

Is there a good NumPy clone for Jython?

I'm a relatively new convert to Python. I've written some code to grab/graph data from various sources to automate some weekly reports and forecasts. I've been intrigued by the Jython concept, and would like to port some Python code that I've…
jbrogdon
  • 671
  • 1
  • 7
  • 15
26
votes
4 answers

Can I program for android using any JVM language?

Can I use other JVM languages besides Java (e.g. jruby, jython, clojure) to program for android, or is it java only? There was a similar question asked over a year ago but I wasn't sure if there'd been any change since then.
rampion
  • 87,131
  • 49
  • 199
  • 315
26
votes
3 answers

How to catch an exception in python and get a reference to the exception, WITHOUT knowing the type?

I'm wondering how I can catch any raised object (i.e. a type that does not extend Exception), and still get a reference to it. I came across the desire to do this when using Jython. When calling a Java method, if that method raises an exception,…
TM.
  • 108,298
  • 33
  • 122
  • 127
25
votes
14 answers

Why use Jython when you could just use Java?

The standard answer is that it's useful when you only need to write a few lines of code ... I have both languages integrated inside of Eclipse. Because Eclipse handles the compiling, interpreting, running etc. both "run" exactly the same. The…
rbrayb
  • 46,440
  • 34
  • 114
  • 174
24
votes
6 answers

Migrating from CPython to Jython

I'm considering moving my code (around 30K LOC) from CPython to Jython, so that I could have better integration with my java code. Is there a checklist or a guide I should look at, to help my with the migration? Does anyone have experience with…
itsadok
  • 28,822
  • 30
  • 126
  • 171
23
votes
8 answers

Email an attachment in R with gmail

I am desiring to send an email in R with an attachment using gmail. I have found that sendmailR does not work with gmail because it requires authentication (I couldn't get it to work with gmail so I assume this to be true unless someone tells me…
Tyler Rinker
  • 108,132
  • 65
  • 322
  • 519
23
votes
3 answers

Add .dll to java.library.path in Eclipse/PyDev Jython project

I'm trying to use a compiled .jar Java library in my PyDev Jython project. I successfully added the .jar to the PYTHONPATH and was able to begin coding with auto complete working. The library requires a .dll extension as well, javaHeclib.dll, so I…
Robbie Rosati
  • 1,205
  • 1
  • 9
  • 23
21
votes
3 answers

Installing Jython on Ubuntu

I downloaded jython_installer-2.5.2.jar from jython.org. Opened the terminal and gave this command:- java -jar jython_installer-2.5.2.jar It was installed in a folder named jython2.5.2 in the home directory But whenever I open the terminal and…
rubicondude
  • 605
  • 2
  • 7
  • 10