473,394 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

jython: user-defined modules

Dear all,

I hope my question is here in the right place...
What I want to achieve is a communication between Java and Python. We
have a pretty strong framework of existing python scripts and modules.
Now I want to use jython in order to faciliate the communication
between another Java framework.

But I`m currently stuck with jython: Trying to import the user-defined
python modules, these cannot be found. I read a lot about the jython
registry and I setup a $HOME/.jython file where I created a
python.path=... resource, however, when I start the jython command
line and type
print python.path
then this property is not found. Passing it with the -D option does
not work as well, or maybe I`m too confused to make it work anyway?

Any help would be great!
Best regards
Greg

Apr 25 '07 #1
1 1483
Gregor Stich wrote:
Dear all,

I hope my question is here in the right place...
What I want to achieve is a communication between Java and Python. We
have a pretty strong framework of existing python scripts and modules.
Now I want to use jython in order to faciliate the communication
between another Java framework.

But I`m currently stuck with jython: Trying to import the user-defined
python modules, these cannot be found. I read a lot about the jython
registry and I setup a $HOME/.jython file where I created a
python.path=... resource, however, when I start the jython command
line and type
print python.path
then this property is not found. Passing it with the -D option does
not work as well, or maybe I`m too confused to make it work anyway?
First of all, you should subscribe to the jython mailing list.

Second, you access the python.path inside jython via

import sys
print sys.path

HTH,

Diez
Apr 25 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Michael Chermside | last post by:
Ype writes: > For the namespaces in Jython this 'Python internal thread safety' > is handled by the Java class: > > http://www.jython.org/docs/javadoc/org/python/core/PyStringMap.html > > which...
6
by: Dave Benjamin | last post by:
Hey good people, I've been doing a lot of simultaneous Jython and CPython programming lately, and just wanted to say, with no intended ill will toward any of the individuals who have been...
0
by: A Evans | last post by:
Hi I would just like to remind people and tell them about my forum on Jython and tell them a little a bit why I started this forum First let me say I am not working as a programmer I offer web...
4
by: angel | last post by:
A java runtime environment includes jvm and java class (for example classes.zip in sun jre). Of course jython need jvm,but does it need java class. Thanx
5
by: Jan Gregor | last post by:
Hello I found that price of += operator on string is too high in jython. For example 5000 such operations took 90 seconds (i generated html copy of table with 1000 rows and 5 columns)....
1
by: scott | last post by:
I installed darwinports and did a "sudo port install jython" ------------------------- scott$ which jython /opt/local/bin/jython ------------------------- Jython works in interactive...
12
by: Mark Fink | last post by:
I wrote a Jython class that inherits from a Java class and (thats the plan) overrides one method. Everything should stay the same. If I run this nothing happens whereas if I run the Java class it...
3
by: Sloan.Kohler | last post by:
Is Jython development dead or has it just seemed that way for over a year?. The jython.org website has a recent new appearance (but no new content) and there is some message traffic on the...
4
by: Neil Wallace | last post by:
Hi all, I am a novice Python/Jython programmer, and Ubuntu user. Ubuntu still only supports only version 2.1 of Jython. I have used the GUI installer of Jython 2.2, and installed it to the...
5
by: sarup26 | last post by:
Hello .. I would like to know more about Python and Jython? What is the difference between both of them? What is the future for Jython and which are the areas where it is used? Swot
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.