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
1
vote
3 answers

PyDev console does not accept ANY input

I'm wondering if anybody can help figure this out... I am running JRE/JDK 7u9 32-bit with Eclipse 4.2.1, and PyDev 2.7.1 (everything is up to date). I've got Jython 2.5.3 installed, and have PyDev set to use it as the interpreter. My issue is that…
user1243151
  • 65
  • 1
  • 5
1
vote
1 answer

Can Jython-based Java classes from an Eclipse PyDev project code be referenced by an Eclipse plugin project?

The following explains my attempts at trying to make a hybrid PyDev/Eclipse plugin project. I have since discovered that even if I make a separate PyDev project, I cannot use my PyDev Jython-based Java classes by referencing the project in a plug-in…
MrMas
  • 1,143
  • 2
  • 14
  • 28
1
vote
0 answers

Accessing the latest robotframework python libraries when using Jython

I am using robotframework-maven-plugin which uses Jython version=2.5.1 for running my test cases. My issue is when I try to use different robotframework libraries such the robotframework-requests I get import errors as I believe Jython…
Seanog
  • 533
  • 6
  • 13
1
vote
3 answers

Jython (pass float array to java) is there more pythonic way?

I am writing jython application with eclipse SWT/JFace. I have to pass float array to java object to get back some values from it. I am using jarray package for it. Is there more pythonic way to do it? bounds = zeros(4, 'f') # from java…
Darius Kucinskas
  • 10,193
  • 12
  • 57
  • 79
1
vote
2 answers

how to run external program inside a monkeyrunner code?

I have a monkeyrunner code (file extension is .py) which is working fine. I am using CentOS. Now, I need to run a an external program and I need to insert that code in the monkeyrunner code. how do I do it? What do I need to import and what is the…
srh snl
  • 797
  • 1
  • 19
  • 42
1
vote
3 answers

Python Jython global variable usage

I have a problem with my understanding of python global variables and their correct usage. The first bit of code works fine, the second bit throws the exceptions "NameError: global name 'chosen' is not defined". I am sure I am missing something…
Paul Smith
  • 454
  • 6
  • 11
1
vote
2 answers

How do I get a value randomly from a list in Jython script?

lists = portTest.lists(arg1, arg2) // this returns the lists from webservice in java // public String[] list1; // public String[] list2;public String[] list3; // i want to get the random element in the list, // not the first, second or any…
srp
  • 521
  • 11
  • 22
1
vote
2 answers

arg can't be coerced to java.util.List? Could any one tell me whats wrong in my code please?

myDict = {'itemkey1':'itemvalue1', 'itemkey2':'itemkey2','itemkey3':'itemvalue3','itemkey4':'itemvalue4'}; event = portTest.event(myDict); I am getting the following error Aborted run: Jython exception: TypeError:arg can't be coerced to…
srp
  • 521
  • 11
  • 22
1
vote
0 answers

name error: pending deprecation warning in jython while importing random

I am using the script to run grinder but when i run its throwing me this exception.Could any one please let me know whats going wrong? why is it not importing random . Thank you Error running worker process (NameError: PendingDeprecationWarning …
srp
  • 521
  • 11
  • 22
1
vote
1 answer

how to use gtk/pywebkitgtk in jython?

In installed standalone jython on my ubuntu 12.04, run it, but if I try to import gtk, I get no module named gtk when in python console it works. Update: I have done >> sys.path.insert(1,"/usr/lib/python2.7/dist-packages/gtk-2.0") and >>…
scythargon
  • 3,363
  • 3
  • 32
  • 62
1
vote
0 answers

Jython sleep in for loop, threading issue?

I am playing about with Jython and Swing, which is a lot of fun. I've run up against something I saw mentioned before but had no useful response. for i in xrange(20): self.y += 1 sleep(0.05) self.canvas.repaint() print self.y this…
DomA
  • 138
  • 1
  • 8
1
vote
2 answers

Jython: Block access to java classes & Change output stream

I'm looking to use the Jython in a Java project I'm working on. And I'm wondering 2 things. Can I disable access to Java classes from Python scripts. IE. stop scripts from being able to do things like from java.util import Date? And can I change…
tomass1996
  • 545
  • 4
  • 6
1
vote
2 answers

How to create a war file from a jython WSGI web application

I would like to deploy a WSGI (keystone) web application, running with jython 2.5.2, as a war file to a java servlet application server (specifically glassfish). How can I create a war file from my keystone web application (or any WSGI app)?
Paul D. Eden
  • 19,939
  • 18
  • 59
  • 63
1
vote
2 answers

How can I use jython setup.py install?

I am using a Jython virtualenv where I can install whatever software via pip or via easy_install, but there is a software that is not registered yet and the installation mode via: [sudo] python setup.py install and I am trying to do the same with…
hudsonsferreira
  • 207
  • 2
  • 13
1
vote
1 answer

How can I run a Jython script on mutiple, remote machines?

So I have some shell scripts that extract and transform certain data in .tar.gz format. The extraction/transformation takes a large set of data and transforms it into individual files that can be used to populate a database. Because the set of data…
1 2 3
99
100