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
7
votes
1 answer

Create byte[] in Jython

I am developing with Jython and I need to use a Java method that requires a byte[] as a parameter. I tried: def randomBytesArray(length): data = [] for _ in xrange(length): data.append(chr(random.getrandbits(8))) …
iomartin
  • 3,149
  • 9
  • 31
  • 47
7
votes
2 answers

Import jar API in Jython

I am trying to import a Java API, which is distributed as a jar file. I followed the instructions from this answer at a similar question in Stack Overflow, but it didn't work. In Jython, I did: >>> import sys >>>…
iomartin
  • 3,149
  • 9
  • 31
  • 47
6
votes
4 answers

What is the most state-of-the-art, pure python, XML parser available?

Considering that I want to write python code that would run on Google App Engine and also inside jython, C-extensions are not an option. Amara was a nice library, but due to its C-extensions, I can't use it for either of these platforms.
gregturn
  • 2,625
  • 3
  • 25
  • 40
6
votes
4 answers

Production ready Python implementations besides CPython?

Except for CPython, which other Python implementations are currently usable for production systems? The questions What are the pros and cons of the various Python implementations? I have been trying to wrap my head around the PyPy project. So,…
wr.
  • 2,841
  • 1
  • 23
  • 27
6
votes
2 answers

Jython Development on Google App Engine

Does anyone have any direct experience (good or bad) using Jython with Google App Engine?
Thomas Lukasik
6
votes
1 answer

Is there a way to create Eclipse plugins with Python?

As far as I understand Eclipse doesn't provide user with python bindings by default. Nor any projects of such kind was I able to find with google. Are there any third-party plugins for that? Any tutorial? May be with Jython?..
lithuak
  • 6,028
  • 9
  • 42
  • 54
6
votes
2 answers

How can I add a gap around the edge of a Jbutton?

I want to leave the default border on my JButtons, but put empty space around them as well. I'm using a vertical BoxLayout. I originally said nothing about the borders, and got single pixel LineBorders, which I want, but the buttons all butted up…
Cam Jackson
  • 11,860
  • 8
  • 45
  • 78
6
votes
1 answer

Using a Python Script in Java (Eclipse)

I've been looking to incorporate a Python Script a friend made for me into a Java application that I am trying to develop. After some trial and error I finally found out about 'Jython' and used the PythonInterpreter to try and run the script.…
This 0ne Pr0grammer
  • 2,632
  • 14
  • 57
  • 81
6
votes
1 answer

Unresolved import org.python / working with jython and java?

I'm using Eclipse and I"m trying to create a java program that can run my python code. I'm following the guidelines on this page:…
NSP
  • 487
  • 2
  • 8
  • 14
6
votes
0 answers

How to create node-like GUI which encapsulates Python code (Like Simulink)?

What I want I want to create a GUI in Python which allows for a node-linkage interaction which encapsulates Python code/objects/functions. The following examples are the kinds of functionality that I would like to achieve. Blender node…
6
votes
3 answers

Issue in calling Python code from Java (without using jython)

I found this as one of the ways to run (using exec() method) python script from java. I have one simple print statement in python file. However, my program is doing nothing when I run it. It neither prints the statement written in python file nor…
JavaYouth
  • 1,536
  • 7
  • 21
  • 39
6
votes
2 answers

What are the advantages/disadvantages of using Jython/IronPython/Pyjamas?

EDIT Okay, rookie here so please bear with me. What I'm trying to ask is the following: Is it plausible for a Python-syntax fan to use one of these options while other team members "plain vanilla" version? Is it a matter of personal preference,…
user456584
  • 86,427
  • 15
  • 75
  • 107
6
votes
1 answer

Jython setup in VS Code

I have tried using PyDev Extension for VS Code. I intend to use vs code for Jython. However, I get this from java.util import Date Date shows unresolved error in Vs code. Can any one guide me how can Jython be setup in Vs Code?
AhmedRana
  • 486
  • 9
  • 22
6
votes
3 answers

Does Jython support Tkinter

Does Jython support Tkinter ? If I code a program in Python and put a GUI front end on it with Tkinter, how hard would it be to do the same program in Jython? Or is there a better solution for Jython GUI's? When i try java -jar "jarname" It is…
Kaveesh Wadhwa
  • 299
  • 1
  • 2
  • 5
6
votes
4 answers

Jython support in editors?

I've recently started writing some performance tests in The Grinder 3, and one of the first things I noticed is that PyCheckMate doesn't work because it can't find some of the imports. Which editor(s) provide the best support for Jython?
Hank Gay
  • 70,339
  • 36
  • 160
  • 222