From: Mark Elston <m.elston@ADVANTEST-ARD.COM> - 2002-04-02 22:50:20
Thanks, Phil. This solution and the one posted by Marty
Stitt should provide the alternatives we need.
Is this approach intended to be merged into Jython in the
future? It seems simple enough that it should be since
it provides some additional flexibility.
From: Phil Surette
Sent: Tuesday, April 02, 2002 1:27 PM
To: 'Mark Elston'
Subject: RE: [Jython-users] Can we use Jython with just the jython.jar file?
I have a solution for this which involves a minor patch
to jython. The patch allows jython to load python modules
from the classpath. It should work fine for you.
I'm attaching a small zip file which contains
the patch, ant buildfile, etc. to allow you to generate
a new jythonall-2.1.jar which contains jython with
the patch applied, along with all the jython modules.
From: Mark Elston [mailto:m.elston@...]
Sent: Tuesday, April 02, 2002 12:15 PM
Subject: [Jython-users] Can we use Jython with just the jython.jar file?
I sent this message last week but got no responses so I am
trying it again.
We are in the process of writing a Java application to control a
piece of test equipment. Our architecture allows us to extend
this application via a scripting language. Jython seems the
perfect choice for this.
However, we will not be able to require all our customers to
install Jython on their systems. We were planning to distribute
the jython.jar file (plus any other jar files necessary).
This has apparently caused a problem.
When testing on a platform without installing Jython or CPython
if we have a script that imports string, re or most any other
module, we get an import error. This does not happen on my
machine (which has both ActivePython and Jython installed).
I tried to fix this by running jythonc on all the standard lib
files in the jython\lib directory and creating a jar file out
of the resulting class files and putting this jar file in the
classpath of the command running our app. We still get import
errors in importing these modules.
So, how do we provide the standard library modules to an embedded
interpreter running on a machine where Jython has not been installed?
A similar question would be how do we provide these modules to an
applet running remotely on a web browser?
Jython-users mailing list