Setting up a Jython installation that runs JyStilts is quite easy.
First, make sure that Jython is installed; it is available from http://www.jython.org/, and comes as a self-installing jar file. JyStilts has been tested, and appears to work, on versions 2.5.0 and 2.5.1; it's recommended to use the latest version if you don't have some reason to use one of the others. Some earlier versions of JyStilts worked with jython 2.2.1, but that no longer seems to be the case; it might be possible to reinstate this if there is some pressing need.
To use JyStilts, all you need to do is to
start jython with the stilts.jar
file on your classpath,
for instance like this:
jython -J-classpath /some/where/stilts.jaror (C-shell):
setenv CLASSPATH /some/where/stilts.jar jython
Finally, you will need to import the stilts module using a line
like "import stilts
" from Jython in the usual Python way.
Optionally, you can extract the stilts.py
module
from the stilts.jar file
(using a command like "unzip stilts.jar stilts.py
")
and put it in a directory on your jython
sys.path
(e.g. jythondir/Lib
);
this may cause jython to compile it to bytecode (stilts$py.class
)
and thus improve startup time.
Note that in this case you will still need the stilts.jar
file on your classpath as above.