27 Aug 12:31
Please explain how to get imports to work for embedded Jython in a .jar
From: Greg Scott <gregory.scott99 <at> imperial.ac.uk>
Subject: Please explain how to get imports to work for embedded Jython in a .jar
Newsgroups: gmane.comp.lang.jython.user
Date: 2008-08-27 10:34:41 GMT
Subject: Please explain how to get imports to work for embedded Jython in a .jar
Newsgroups: gmane.comp.lang.jython.user
Date: 2008-08-27 10:34:41 GMT
Hello, I have been looking far and wide for an explanation of how to get imports to work as follows:
- I have a file mypython.py in a package called com.example
- I can successfully execute this python file using JSR223, getting the file as a stream etc.
- However, if in my python file I try and import another of my files, it always fails, e.g. in the same folder I have a python file myotherfile.py
The python code
# mypython.py
import myotherfile
Produces the error ImportError: no module named myotherfile
I am using Netbeans 6.1 if that makes a difference
Could someone please explain why this happens and advise how to fix it?
Thank you very much indeed.
Greg
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ Jython-users mailing list Jython-users <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jython-users
RSS Feed