469,902 Members | 1,813 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,902 developers. It's quick & easy.

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 1372
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Michael Chermside | last post: by
6 posts views Thread by Dave Benjamin | last post: by
reply views Thread by A Evans | last post: by
4 posts views Thread by angel | last post: by
5 posts views Thread by Jan Gregor | last post: by
12 posts views Thread by Mark Fink | last post: by
3 posts views Thread by Sloan.Kohler | last post: by
4 posts views Thread by Neil Wallace | last post: by
5 posts views Thread by sarup26 | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.