top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

what is Jython and what are the pros and cons then switching from Python to Jython?

+1 vote
1,049 views

I tried to find out more on the internet but didn't have much success. All I know is that its a combination of Python and Java. I have following queries -

Is it more Java than Python or the other way around?
Is Jython free like Python?
Is the programming language for Jython similar to Python or similar to Java?
Are there pros and cons then switching from Python to Jython?

posted Jan 9, 2015 by Dewang Chaudhary

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+2 votes

Jython

1) is a Python compiler that compiles Python source code into JVM bytecode (class, jar, whatever) that runs on a standard Java runtime. Python programs compiled with Jython can call standard Java libraries and and can call or be called by code written in Java.

2) is a Python compiler that is written in Java.

AFAK, these are in principal orthogonal. Number 1) is the important part and does not require that 2) be true. The Jython compiler could (in theory) be implemented in C, Fortran, or BASH, but there are some practical advantages to using Java to write a compiler that generates JVM bytecode.

answer Jan 9, 2015 by anonymous
+2 votes

Jython converts Python code into Java byte code, but are there any syntax changes between the two.

According to the Jython website, the latest stable version is currently 2.5.3b1, and the latest development version is 2.7a2.

Differences of - Python & Jython

Python
C
Multi-platform
Compiles to .pyc
Extend with C
GIL 1*
Python Garbage Collection
1*. Global Interpreter Lock, explained in Documentation Python documentation, chapter 8.1 (1)

Jython:
100% Java
Any JVM (currently 1.1+)
Compiles to .class
Extend with Java
Truly multi-threaded
Java garbage collection

answer Jan 9, 2015 by Amit Kumar Pandey
Similar Questions
0 votes

We are developing our own automation test toolkit basing on MonkeyRunner. We intent to reuse some of our old python classes. I just realized that I came across 'jython version is too low' problem. our Python classes are targeting for 2.7. currently MonkeyRunner is running on top of 2.53.

my question is as follows:
Can I update jython only for monkeyrunner? if yes, how?

+3 votes

I was searching for RRH and BBU related stuff and found a query related to that.
Reference:
http://tech.queryhome.com/145400/what-based-network-architecture-which-cases-operators-prefer

I gone through the content and understood at a very high level. Now I have related but deep queries as following:

How this architecture handle the delay that comes due to gap between RRH and BBU ? Is there any specific hardware/software or combination of both needed to mitigate the delay affect ? And one more related question, is there any one to one mapping with BBU and RRH or it can be in any combination ?

...