From: Ted B. <te...@et...> - 2001-08-26 21:05:08
|
On Sunday 26 August 2001 04:51, Finn Bock wrote: > [ted] > > >I'm looking at adding jython to a java application i'm writing. To make > > life easier for the end user, I'd like to distribute jython as part of > > the application jar. > > > >My question is this: > >Is it possible or practical to distribute the python modules ( eg. > > string.py ) in the jar? > > In jython-2.0 you will have to write your own __import__ hook. That can > be kind of tricky to do. oh. > >Would jython support having a jar pathname pushed into the > >library path ( eg. sys.path.insert( 0, '/home/foo/application.jar!/lib' ) > > )? > > This feature have been added to Jython 2.1a3. I would welcome feedback > on its usefullnes in real life applications. Killer! Heh my app keeps getting fatter, but at least I can keep the end user download requirements to a minimum. Is there something in a readme about how to use this feature? I only have 2.1a1 installed right now, but i'll be picking up the latest rev when time permits. I'll let you know how it goes as soon as I have tested it. ted |