[Python-Dev] Add a -z interpreter flag to execute a zip file

Chris Monson shiblon at gmail.com
Fri Jul 13 13:40:51 CEST 2007


(Sorry about top-posting: I'm using my blackberry while waiting for
the bus and my gmail client doesn't do quoting :-( )

Certainly java won't let you specify -jar more than once, because that
would be telling it to *run* two files.  It *will*, however, let you
specify more than one jar in the classpath.  This is done all the
time, making the contents of those jars available for importing.

These aren't typically combined, since the whole point of running a
jar file is to have a single distributed package, but IIRC it is not
prohibited.

- C



On 7/12/07, Neal Norwitz <nnorwitz at gmail.com> wrote:
> On 7/12/07, Fred L. Drake, Jr. <fdrake at acm.org> wrote:
> >
> > Phillip Eby:
> >  > Testing your package before you zip it, would be one.  :)  My
> >  > personal main interest was in being able to add an item to sys.path
> >  > without having to set $PYTHONPATH on Windows.  That's why I'd like it
> >  > to be possible to use -z more than once (or whatever the option ends up
> >  > as).
> >
> > What happens if multiple entries contain __main__.py entries?  I don't
> like
> > this one so much.  I don't know what Java does if you specify -jar more
> than
> > once; that might suggest something.
>
> You can't with:
> java version "1.5.0_11"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_11-b03, mixed mode)
>
> -help says:
>      or  java [-options] -jar jarfile [args...]
>            (to execute a jar file)
>
> args are passed to the jarfile being run.
>
> $ java -jar xalan2.jar -jar xalan2.jar
> Invalid option: -jar
> Invalid option: xalan2.jar
>
> n
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/shiblon%40gmail.com
>


More information about the Python-Dev mailing list