If can use the __file__ attribute of your main script to locate your jar relatively to its location with something like:

sys.path.append(os.path.join(os.path.dirname(__file__), 'name_of_jar.jar))

I don't think it is a lot of work. :-)

2011/5/13 Konrad Hinsen <konrad.hinsen@fastmail.net>
On 13 May 2011, at 10:49, Pierre Thibault wrote:

I mean: Just add the .py files to the jar and add the jar file in your sys.path.

I just checked, this works! It's not that easy to apply in real life because I need to modify sys.path before any script is run, but perhaps with a sitecustomize.py in the jython.jar this can be arranged.




My blog and profile (http://pierrethibault.posterous.com)
YouTube page (http://www.youtube.com/user/tubetib)
Twitter (http://twitter.com/pierreth2)