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
5
votes
3 answers

Using Pig and Python

Apologies if this question is poorly worded: I am embarking on a large scale machine learning project and I don't like programming in Java. I love writing programs in Python. I have heard good things about Pig. I was wondering if someone could…
dvk
  • 111
  • 2
  • 5
5
votes
4 answers

Rename files, Python/Jython

I have a directory full of files, some which have an ampersand in their names. I would like to rename all the files with ampersands and replace each ampersand with a plus (+). I am working with around 10k files. What would be the best method to…
RailsSon
  • 19,897
  • 31
  • 82
  • 105
5
votes
1 answer

Jython for Android

I'm testing Jython for Android taken from here http://code.google.com/p/jython-for-android/ Unfortunately I have a problem during the launch... I tried to import all the libraries in one of my project and in the method onCreate of my activity I put…
Erenwoid
  • 983
  • 6
  • 13
  • 25
5
votes
1 answer

Add file filters to JavaFx Filechooser in Jython and parametrize them

I created a javaFX chooser file in Jython. It wasn't easy to port from Java to Jython, but in the end some results came. Now I would like to parameterize the obtained class, taking into account the file filters, so as to be able to use the object…
Memmo
  • 298
  • 3
  • 8
  • 31
5
votes
1 answer

Running Monkeyrunner from pydev

Hi I want to run python scripts developed from Monkeyrunner in Eclips-Pydev setup. I have installed Jython and mapped the Jython interpreter and added the Monkeyrunner.jar to Pydev also. But still I'm not able to import com.android.monkeyrunner…
ram
  • 51
  • 3
5
votes
2 answers

Defining a classpath for a Jython virtual environment

I have installed Jython, a virtualenv named "jython-env" and have installed "bottle" for doing some web application development. I have to use some JAR files in this application for consumption by some Python code. I know I have to set the classpath…
rubicondude
  • 605
  • 2
  • 7
  • 10
5
votes
1 answer

How to use the --core-library option in eclipse/Android

Trying to build a project, the project is Jythonroid. I managed to troubleshoot all the errors but it won't compile. The interface suggests using the --core-library option. Any idea how to set this flag in eclipse for Android. Cheers
Andrew
  • 51
  • 1
  • 3
5
votes
0 answers

importing python package with PythonInterpreter in java

i'm trying to using function from python code in java code (in Netbeans) by using PythonInterpreter and it worked fine when there is no any imported package in python code, but in my code where there is a package is need to import "tweepy" i got an…
s99
  • 119
  • 1
  • 1
  • 8
5
votes
1 answer

Jython and the SAX Parser: No more than 64000 entities allowed?

I've done a simple test of the xml.sax parser in Jython on a large XML file (800 MB) and encountered the following error: Traceback (most recent call last): File "src/project/xmltools.py", line 92, in sys.exit(main()) File…
clstaudt
  • 21,436
  • 45
  • 156
  • 239
5
votes
4 answers

ImportError: Cannot import site module and its dependencies: No module named site

I am trying to run jython servlets on Windows. I can’t run even the most simple HelloWorld.py. I get the following 500 error: message Servlet.init() for servlet [PyServlet] threw exception ... description Le serveur a rencontré une erreur interne…
Christine VACHER
  • 137
  • 1
  • 1
  • 9
5
votes
0 answers

Jython 2.7 with Java 1.8 - Import custom jar

I'm using jython 2.7 with java, with the objective of creating a python wrapper around my jar file (let's call it myJar.jar) Here's my python file: import sys sys.path.append('/pathTo/myJar.jar') from java.lang import Math #this works from java.io…
Saransh Kejriwal
  • 2,467
  • 5
  • 15
  • 39
5
votes
0 answers

How can I install Python libraries using Jython Standalone in Java?

I am trying to install Python libraries using a Jython Standalone jar in Java. The code I have seems to install PIP 7.1.2 in a folder next to the standalone jar, but once I try to use PIP to upgrade itself, it fails with a ZipImportError. The…
Brian Frazho
  • 51
  • 1
  • 4
5
votes
1 answer

Sikulix/Jython UAC automation

I was wondering if anyone had any luck automating through UAC pop-ups during installer automation? I have an existing Automated installer code but it fails at the UAC area due to Sikuli not using keyboard/mouse during this step... Anyone had any…
user1304228
  • 189
  • 1
  • 4
  • 12
5
votes
3 answers

Hidden Multithreading Bottlenecks in Jython?

What are some common hidden things that can bottleneck multithreading/parallelism in Jython? I have some parallel code (using Python's threading library) that won't scale past 3-4 CPUs, and I'm sure it's not because of any of these obvious…
dsimcha
  • 67,514
  • 53
  • 213
  • 334
5
votes
4 answers

passing data between java and python

Apologies if my question is noob. I'm running Django 1.2 with pgsql 8.4 and I'm required to run a Java program after getting the inputs from the user, does some calculations and return the results back to the user. May I know what is the best way to…
goh
  • 27,631
  • 28
  • 89
  • 151