|
From: <bc...@wo...> - 2001-04-13 17:08:17
|
[Danney Jarman] >Previously I had sent the following; however, since I did not get any >response, here it is again. The first time there wasn't any code included. >I have been programming in Java only a few days, and one of my first >projects was to work on the ability to integrate Jython into >InstallShield. >Though there were many possible solutions, I wanted to have >the ability for Jython to import .py modules from jar and zip >files. We all agree that this feature is very usefull. >I wrote the method loadFromZipFile into the imp.java file >to resolve the problem. I realize it is quite crude; however, My hope is >that a REAL Java programmer will run with it to add this capability >to a build. I have found this capability a great deal of help in my >attempts to create a number of Jython deployment solutions. There are some problems with your code. 1) The .zip file(s) is opened and closed for each module that is searched through sys.path. That will make .py and $py.class from .zip very much slower than from directories. I believe that java programmers will expect .zip files to be just as fast as directories. They will have this expectation based on their experience with CLASSPATH envvar. That will mean that the .zip files have to be kept open and that we must track changes to sys.path and close the zip file only when it is removed from sys.path. 2) When .py and $py.class can be loaded from zip files on sys.path, the same support should also exists for zip files on CLASSPATH. We have to find a solution for atleast #1 above before we can add this feature to the build. regards, finn |