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
2085
votes
23 answers

Is there a way to run Python on Android?

We are working on an S60 version and this platform has a nice Python API.. However, there is nothing official about Python on Android, but since Jython exists, is there a way to let the snake and the robot work together??
Bite code
  • 578,959
  • 113
  • 301
  • 329
138
votes
13 answers

Calling Python in Java?

I am wondering if it is possible to call Python functions from Java code using Jython, or is it only for calling Java code from Python?
Shahab
  • 1,977
  • 6
  • 24
  • 28
133
votes
7 answers

Boolean identity == True vs is True

It is standard convention to use if foo is None rather than if foo == None to test if a value is specifically None. If you want to determine whether a value is exactly True (not just a true-like value), is there any reason to use if foo == True…
Uyghur Lives Matter
  • 18,820
  • 42
  • 108
  • 144
84
votes
4 answers

When will Jython support Python 3?

According to Jython's documentation: Jython is an implementation of the Python language for the Java platform. Jython 2.5 implements the same language as CPython 2.5, and nearly all of the Core Python standard library modules. (CPython is…
Adam Paynter
  • 46,244
  • 33
  • 149
  • 164
66
votes
7 answers

Programming Android apps in jython

The other day I came across a Python implementation called Jython. With Jython you can write Java applications with Python and compile them to pure Java. I was wondering: Android programming is done with Java. So, is it possible to make Android…
mid_kid
  • 1,460
  • 2
  • 13
  • 15
62
votes
3 answers

log4j with timestamp per log entry

this is my log output INFO main digestemails - process inbox INFO main digestemails - checking for emails in c:\development\DCMail\email\KN-Source INFO main digestemails - digesting 003d01c95a7b_3446880_0202fea9@xxxx.com.eml INFO main digestemails -…
Setori
  • 10,326
  • 11
  • 40
  • 46
61
votes
7 answers

Using Python from within Java

Possible Duplicate: Java Python Integration I have a large existing codebase written in 100% Java, but I would like to use Python for some new sections of it. I need to do some text and language processing, and I'd much rather use Python and a…
Liam
  • 788
  • 1
  • 6
  • 9
60
votes
9 answers

Cross-platform way to get PIDs by process name in python

Several processes with the same name are running on host. What is the cross-platform way to get PIDs of those processes by name using python or jython? I want something like pidof but in python. (I don't have pidof anyway.) I can't parse /proc…
Alex Bolotov
  • 8,781
  • 9
  • 53
  • 57
59
votes
4 answers

Distributing my Python scripts as JAR files with Jython?

I have been a Python programmer for almost two years, and I am used to writing small scripts to automate some repetitive tasks I had to do at the office. Now, apparently my colleagues noticed this, and they want those scripts too. Some of them have…
sharat87
  • 7,330
  • 12
  • 55
  • 80
58
votes
6 answers

Modern, high performance bloom filter in Python?

I'm looking for a production quality bloom filter implementation in Python to handle fairly large numbers of items (say 100M to 1B items with 0.01% false positive rate). Pybloom is one option but it seems to be showing its age as it throws…
Parand
  • 102,950
  • 48
  • 151
  • 186
53
votes
4 answers

How can I install various Python libraries in Jython?

I know that I can install Jython with Java and that I can use Jython where I use Python. The Jython shell is working fine. In Jython, how can I install libraries like lxml, Scrappy and BeautifulSoup that I'd normally install via pip or easy_install
Mirage
  • 30,868
  • 62
  • 166
  • 261
44
votes
6 answers

Using a java library from python

I have a python app and java app. The python app generates input for the java app and invokes it on the command line. I'm sure there must be a more elegant solution to this; just like using JNI to invoke C code from Java. Any pointers? (FYI I'm v.…
Jim
  • 1,040
  • 1
  • 10
  • 16
42
votes
1 answer

Why is Jython much slower than CPython, despite the JVM's advances?

No flame wars please. I am admittedly no fan of Java, but I consider the JVM to be a fairly decent and well-optimized virtual machine. It's JIT-enabled and very close to the common denominator of the prevalent CPU architectures. I'd assume that the…
san
  • 4,144
  • 6
  • 32
  • 50
41
votes
1 answer

What is the difference between Python vs Jython vs IronPython vs wxPython?

I am quite new in Python programming. While googling I found some of the Python related words. I just wanted to know what is the difference among Python, Jython, IronPython, and wxPython. I know wxPython is for GUI programming. But what are Jython…
Rasmi Ranjan Nayak
  • 11,510
  • 29
  • 82
  • 122
40
votes
4 answers

How can I add jars to the classpath when I invoke Jython *without* adding them to $CLASSPATH?

I'd like to do something similar to jython -cp FOO:BAR:BAZ argle.py. If I add FOO, BAR, and BAZ to $CLASSPATH this works. I tried to add them to sys.path at run-time, but that doesn't appear to work for jars. It does work if I add a path to the…
Hank Gay
  • 70,339
  • 36
  • 160
  • 222
1
2 3
99 100