From: Ted B. <te...@et...> - 2001-09-26 19:09:38
|
I have a java application that makes use of jython as a scripting engine. I want to allow the end user to extend the functionality I provide by dynamically loading module ( java or python ) at runtime. The java stuff is working fine, but i'm running into a problem with the embedded python. runtime sys.path looks like this: ['.', '/home/tedberg/.javaws/cache/http/Djopenrpg.sourceforge.net/P80/DMfiles/RMjopenrpg.jar!Lib', '/home/tedberg/.javaws/cache/http/Djopenrpg.sourceforge.net/P80/DMfiles/RMjopenrpg.jar!scripts', '/home/tedberg/jopenrpg'] I can import python modules in the directories "Lib" and "scripts" that are in the jar. What I *cannot* do, and *need* to do, is import modules in "!scripts/pyhandlers". I have tried: from scripts import pyhandlers import scripts.pyhandlers import pyhandlers all of which return a "no module named" referencing scripts and pyhandlers respectively. Also: I can do a "import nodehandlers" ( nodehandlers is a dir in /home/tedberg/jopenrpg ), but I cannot import any modules *within* that directory.l What *am* I doing wrong? ted |