From: Frank W. <fwi...@gm...> - 2008-06-09 13:55:23
|
On Mon, Jun 9, 2008 at 12:53 AM, Philip Jenvey <pj...@un...> wrote: > > On Jun 8, 2008, at 8:09 PM, Georgy Berdyshev wrote: >> >> In addition I was working on getting bootstrap.py to work on Zope, which >> needed modifications to the code (process execution), but also an >> implementation >> for the CPython flag "-m" in Java for Jython, which is mostly done and >> working. >> The CPython "-m" flag which is now available for Jython searches for a >> given module >> name "foo" in the sys.path and runs the corresponding "foo.py" file as a >> script. > > Are you using CPython 2.5's runpy.py? I would think it would simplify our -m > implementation quite a bit, compared to what CPython 2.4 was doing. I just became aware of runpy.py this morning looking through "what's new in Python 2.5?" -- here are some pointers: http://docs.python.org/whatsnew/pep-338.html http://www.python.org/dev/peps/pep-0338/ Too bad I didn't know about this when you asked.... probably when you send email questions it would be a good idea to cc jyhton-dev just in case someone else knows something like this. Of course this may be beyond the scope of you Zope work, but it does look like it is "the right way" to do -m. -Frank |