Found 2 Articles for Jython

Introduction and Installation of Jython

Arpana Jain
Updated on 11-Oct-2023 13:37:59

86 Views

Introduction Jython, commonly known as "Python for Java" is a powerful python programming language which has a Java Virtual Machine (JVM) based version in it . It brings together the strength and easy work elasticity of Java and Python, allowing coders to enrich themselves by using Java's libraries and frameworks and while coding in one the easiest coding language that is python. This combined version of Java and Python is Jython, where coders are allowed to access java 's classes and libraries from python scripts. Recently, Jython has immensely popularized, mainly among the coders who mostly prefer to use python ... Read More

How we can import Python modules in Jython?

Rajendra Dharmkar
Updated on 30-Jul-2019 22:30:20

970 Views

You can use pure python modules from jython. You can't use modules that are implemented in C. To use modules from your pip installs, you need to add the sys.path of python to that of Jython as Jython does not automatically pick up the PYTHONPATH informationJython 2.5 introduced the JYTHONPATH environmental variable as Jython-equivalent of PYTHONPATH, so setting both to the same value should do the trick for most use cases (unless you're working in a setup with incompatible Python an Jython versions).Now you can import python modules installed locally directly using 'import' in Jython.

1
Advertisements