From: Phil S. <psu...@es...> - 2001-09-17 13:26:19
|
I've been wrestling with the same problem, just posted to jython-dev about it in fact. As far as I can tell, what you want to do is not supported but you can add support with the following patch to org/jython/core/imp.java in jython-2.1a3: imp.java 498a499,502 > //if it's not a builtin or in the python path, try the classpath > ret = loadFromClassLoader(name, imp.class.getClassLoader()); > if (ret != null) return ret; > Then you need to add the standard modules to the jython.jar file. I have an ant file that does this if you're interested. -----Original Message----- From: Antonio Rodriguez [mailto:An...@ho...] Sent: Sunday, September 16, 2001 10:40 PM To: jyt...@li...; ds...@ri... Subject: Re: [Jython-users] import from jar--clarification Let me clarify: Im not asking how to put classes in the classpath. I'm asking how to put all of the standard python library (the .py modules like re.py and httplib.py) that compile to *$py.class into a jar in such a way that when a PythonInterpreter runs over the line: import re, it can import the python library from a jar. Thanks. -|dman <ds...@ri...> wrote on Sun Sep 16 20:56:03 EDT 2001: On Sun, Sep 16, 2001 at 05:11:10PM -0400, Antonio Rodriguez wrote: | How do I put a jar in the path of a PythonInterpreter object? $ java -help Usage: java [-options] class [args...] (to execute a class) or java -jar [-options] jarfile [args...] (to execute a jar file) where options include: -client to select the "client" VM -server to select the "server" VM -classic to select the "classic" VM If present, the option to select the VM must be first. The default VM is -client. -cp -classpath <directories and zip/jar files separated by :> set search path for application classes and resources -D<name>=<value> set a system property -verbose[:class|gc|jni] enable verbose output -version print product version and exit -showversion print product version and continue -? -help print this help message -X print help on non-standard options $ The use -classpath option to the JVM you run jython with. HTH, -D _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |