2

Can I use my working Python code as Jython? Are there any differencies? The point is that I have code in Python, but I want to divide the code into, at least, 2 parallel running processes to improve speed of my program. This can be done using Python because of Global Interpreter Lock. So my idea is to get whole code and compile it using Jython compiler.

Is it possible? If yes, are there any disadvantages?

2
  • possible duplicate of Are CPython, IronPython, Jython scripts compatible with each other? Commented Nov 9, 2014 at 19:16
  • 1
    you need to be a bit more descriptive of the kind of code you are planning to port. In an ideal scenario will work just by using jython code.py. But the reality is you will find that that is not the case. First of all what is it that you are doing that needs you to run 2 parallel processes? Is the task IO bound or CPU bound? Did you try using multiprocessing module ? Commented Nov 12, 2014 at 14:24

1 Answer 1

2

Most of my code works fine on both Python and Jython. I often use databases (Oracle, PostgreSQL and Informix), so I have different "connector" for Jython (which uses JDBC) and for Python (various libraries). There are some little bugs in Jython 2.5.3 I use like parsing date with %f, but most of libraries I use just work with Jython.

You question is very general. I don't think we can help you without more details like libraries you use (databases, scientific, games, network, text processing etc).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.