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

Can you run Jython on the JVM that runs on Pulse smart pens?

I'm looking at developing an application that takes advantage of the Pulse smart pen. I would rather do it in python than java. Its not clear what version of the jvm runs on the pen, as evidence here in the tech specs Are there limitations on…
DevelopingChris
  • 39,797
  • 30
  • 87
  • 118
1
vote
1 answer

Import urlfetch doesn't work on Jython Google App Engine

I'm using Jython on Google App Engine, but I can't get 'import urlfetch' to work. Other imports like 'import sys' and 'import zlib' work, but not 'import urlfetch'. I get a 500 Server Error. What am I doing wrong? The error messages in my dashboard…
1
vote
1 answer

Multiple Jython environments in single JVM

Is it possible to run more then one Jython environment with different system settings (i.e. library import paths) under one JVM. If it possible please suggest how this can be done properly. Technically nothing prevents me from having…
vvladymyrov
  • 5,715
  • 2
  • 32
  • 50
1
vote
1 answer

Android Monkeyrunner's: Can it stop at first error?

I'm unit testing an Android app using Monkeyrunner with Jython on Eclipse. Eclipse: 4.2.1 Eclipse plugin PyDev: 2.7.1 Jython: 2.5.3 When running the tests I would like it to fail at the first assertion failure. Shortened test script: if __name__…
gpo
  • 3,388
  • 3
  • 31
  • 53
1
vote
0 answers

'NoneType' object is unsubscriptable during war file creation in Django-Jython

I am trying to generate a war file on my local machine, so as to deploy the Django application on the web server. I am using Django-Jython for the same purpose. I am using a MySQL database and have set the CLASSPATH variable as mentioned in the…
niting
  • 2,384
  • 3
  • 19
  • 20
1
vote
1 answer

How can i fix this File "" error in python

I trying to do the simple script and its throwing the below error at for loop, WASX7017E: Exception received while running file "/abc/websphere/wasad/createusers.py"; exception information: com.ibm.bsf.BSFException: exception from Jython: Traceback…
sathish kumar
  • 11
  • 1
  • 3
1
vote
1 answer

transforming Jython's source / ast

I've got a problem to solve in Jython. The function I've got looks like this: ok = whatever1(x, ...) self.assertTrue("whatever1 failed: "+x...(), ok) ok = whatever2(x, ...) self.assertTrue("whatever2 failed: "+x...(), ok) [ many many lines ]…
viraptor
  • 33,322
  • 10
  • 107
  • 191
1
vote
1 answer

How to save email image attachment using Jython

I'm attempting to grab an image attached to an email using Jython 2.5.3. I get the email (using they Jython version of the Python imap library). I can get the attachment by looping through the parts, finding the correct part type using…
theodox
  • 12,028
  • 3
  • 23
  • 36
1
vote
0 answers

What does Jython need for SimpleXMLRPCServer to work?

I tried the first example from the python documentation for SimpleXMLRPCServer. It works perfectly fine in python, but when I try it using jython I get the following stacktrace: Traceback (most recent call last): File "sampleclient.py", line 4, in…
bj0
  • 7,893
  • 5
  • 38
  • 49
1
vote
2 answers

When copying a picture in Jython/Python, how to copy X pixels less with every row

I'm writing a code in Jython, that will copy part of one picture into an empty picture, but I want it to copy (let's say) 10 pixels less with each next row. I don't think I make sense, let me explain with an example. A picture 100 pixels by 100…
patorikku
  • 113
  • 4
  • 11
1
vote
2 answers

class importing in jython

I've got a jython script that needs to include a class (from JUnit in this case). I've got the junit jar in "some/path/junit.jar". My script is: from junit.textui import TestRunner TestRunner.Main(["name of some class here"]) I'm running it like…
viraptor
  • 33,322
  • 10
  • 107
  • 191
1
vote
3 answers

How to delete an XML element using Java DOM in Jython?

Suppose I have a XML file like this (bookstore.xml ) Everyday Italian Giada De Laurentiis 2005 30.00
vasu1486
  • 127
  • 2
  • 7
1
vote
1 answer

Timing Out Python Input

Is it possible to time out python 3 input? I managed to do what I want in Java, but how can you do it in python? Can you use jython and manage to compile it so that it doesn't need a jython installation to run (I only have python available on the…
Noah Singer
  • 526
  • 2
  • 6
  • 17
1
vote
1 answer

How can I extend a java TimerTask in Jython and pass parameters to it?

I'm trying to extend a TimerTask in Jython to read data from some sensors, and then send that data through the network every one second. In order to do that I need to pass the reader and server objects (as well as some event objects) to the…
Zobal
  • 143
  • 2
  • 11
1
vote
3 answers

Jython interpreter configuration failed in PyDev

I tried for an hour without any progress. I'm using Eclipse Juno and the latest PyDev. Win 7. I installed Jython on E disk. When I tried to configure the Jython interpreter route in PyDev (Preference -> PyDev -> Interpreter-Jython -> Add), I get the…
Jarvis
  • 11
  • 1
  • 3