jython

Java GC Threading Bottleneck in Practice?

How well optimized is Java's parallel collecting GC for multithreaded environments? I've written some multithreaded Jython code that spends most of its time calling Java libraries. Depending on which options I run the program with, the library calls either do tons of allocations under the hood or virtually none. When I use the options...

Python requires a GIL. But Jython & IronPython don't. Why?

Why is it that you can run Jython and IronPython without the need for a GIL but Python (CPython) requires a GIL? ...

Cannot import "logging" module using Jython in embedded Jetty -> ImportError: no os specific module found

I'm trying to use Jython (embedded) in a Jetty server (all through Maven) to invoke a simple Python script. My script works fine as long as I don't try to use any of the standard library's such as 'logging.' Whenever I try to import one of the standard library's it fails with the exception "ImportError." The exception I get is: F...

Jython compilation options?

Are there any options for me to do the following using Jython (embedded in Jetty): Change the output of the compilation (i.e. write the class files somewhere else)? Completely disable the compilation? Thanks. KJQ ...

How to use JacORB in Jython

I want to write a CORBA test client in Jython and I select JacORB as ORB implementation. However I have a try for around 1 day and ORB.init can't be successfully in Jython and error log is: ====================================================================== ERROR: testEPAgentIsAlive (com.ericsson.xn.nbi.test.epagent_test.Test) Tra...

Loading resources off the classpath in Jython using 'classpath:'

I've got a relatively large Java application that would benefit from a bit of Python love. To that end I've been working on getting it up and running in Jython. My current roadblock is getting the classpath right. I've taken two approaches to setting the classpath: Using a shell script, I've built up a list of jars and executed java -...

When java program is started using Python's subprocess.Popen() exits, why database connection opened by the subprocess is not closed?

We use Robot Framework for test automation, and our jython test code spawns a java subprocess using subprocess.Popen(): cmd = "java -jar program.jar" process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) process.wait() Java code utilizes a JDBC connection to Oracle database, and the sa...

How can JVM implementations like Jython and JRuby beat their native counterparts?

I was watching this video here, where Robert Nicholson discusses P8, an implementation of PHP on the JVM. At some point he mentions that they aim to surpass native PHP in performance some time in the future. He mentions JRuby and Jython, which started out slower than their native counterparts, but eventually surpassed them. Quercus, an...

Jython returns False to gettattr([alist],'__reversed__') while Python returns True..

While debuging why cmd2 wont load in in Jython, I found out that it breaks because Jython returns False to gettattr([alist],'reversed') while Python returns True. I would assume that the correct result is True as a list is reversible.. Anyone knows what is going on? my next option is to browse around Jython source.. and I am not lo...

Calling a method with a java.lang.Class in Jython

Hi I'm trying to use SimpleLog from Jython but I can't find any way of using its constructors because one of the arguments is always a java.lang.Class. logger = SimpleLogger(name) <--doesn't work logger = SimpleLogger(self) <--doesn't work logger = SimpleLogger(SimpleLogger.class) <--doesn't work The problem right now is with ...

Jython: Access singleton Java class (static)

Hi, I cannot seem to get the syntax quite right for this: I have a Jython script and a Java application loaded into the same JVM (for testing). I need to access a particular part of the application through a Singleton class from the Jython script. How do I do this? Thanks EDIT: The set up is for automated testing, so assume that t...

Which cross platform scripting language should we adopt for a group of DBAs?

Hi there, I wanted to get the community's feedback on a language choice our team is looking to make in the near future. We are a software developer, and I work in a team of Oracle and SQL Server DBAs supporting a cross platform Java application which runs on Oracle Application Server. We have SQL Server and Oracle code bases, and supp...

Using Jython, why does importing and inlining a class yield different behaviour?

I'm putting together a swing gui, in Jython, and wish to use a processing PApplet. So I do something like from processing.core import * class ProcessingApp(PApplet): def __init__(self): PApplet.__init__(self) #... def setup(self): #... def draw(self): #... and then later on in the module,...

Uses of Jython while programming

I recently started learning Python and came accross the term Jython. From the Google search results, I thereby concluded that it is indeed a very important term. What is the experience programming/coding using Jython? ...

Real-world Jython applications

I recently started learning Python. Not yet ventured into coding. During one of my learning sessions, i came accross the term Jython. I googled it & got some information. I would like to know if anyone has implemented any real-world program using Jython. ...

PyDev: Jython modules & Java classes in the same project

I come from a Java world and am totally new to Jython. Is it possible to create a project in Eclipse with both Jython and Java classes on the same project? I tried to do so -writing a simple Java class and using it in Jython module- and everything went fine during coding. But when I try to run the project I get: Traceback (most recen...

Django on Jython with Oracle: Too many open cursors

Hi. I am running Django on Jython with Oracle and I often get the famous "Too many open cursors" error. It never happens with the same code with Python and the cx_Oracle driver. Is there something wrong with the zxJDBC driver or perhaps there is a way to ask Django to close the cursors when I am done with the querysets? Thank...

Using Jython with Maven

Hi, I have a Maven module, that depends on various other Maven dependencies by which I am accessing through my jython code. I am now done, and I would like to compile the project as a .jar, or even just run it without compiling, but I have no clue where to start. Does anyone have any idea how I can run some .py files that accesses som...

Unsatisfed LinkError in java ?

Hi Experts, I am running jython to connect to Bladelogic managers for which i need to connect to it. When i try to do it. It says following Error: java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: no XJNIService in java.library.path. Can you please help me to resolve this issue. Regards Gnash-85 ...

Creating a Swing based GUI in Jython

Today, I've been dabbling in using jython to create a GUI using swing. I'm no expert programmer, so I decided to have a go at using the Netbeans IDE to design the interface and then adapt the output for use in jython as I have more experience in python than Java. After working through the code I managed to rid all the syntax errors but a...