[Python-Dev] hook for standalone executable

Steve Holden sholden at holdenweb.com
Sat Aug 9 11:42:46 EDT 2003


> -----Original Message-----
> From: python-dev-bounces at python.org
> [mailto:python-dev-bounces at python.org]On Behalf Of Mark Hammond
> Sent: Saturday, August 09, 2003 1:34 AM
> To: 'Thomas Heller'; python-dev at python.org
> Subject: RE: [Python-Dev] hook for standalone executable
>
>
> I'm with Jack to some extent - it seems a little hacky.  But
> the problem is
> real.
>
> > but on some platforms, at least, a zipfile can be appended to
> > a copy of
> > the interpreter executable itself).
> >
> > Alex Martelli and Oren Tirosh also came up with ideas how
> to do this,
> > and it seems a hook in Py_Main() would be able to do the trick.
>
> How about splitting this out a little.
>
> * Make changes to Py_Main() necessary to better support
> "hard-embedders",
> which may include custom sys.argv/environ processing.
>
> * Propose a new executable that some Python platforms can choose to
> distribute - eg, 'python-package{.exe}'.  This is really just
> identical to
> python.exe, but with the only 'if doesnt start with 'python''
> parts of your
> proposal.
>
> This seems like less magic, but still more flexible for those
> people who
> *still* aren't happy with what we did <wink>
>
I agree with [?Skip?] that the file's *name* is a poor way to determine
whether magic behavior should be invoked.

Seems to me that the interpreter should know it's own length as an
executable. Then, if it gets loaded from a longer file, it can assume
there are zipped modules to be imported and run by whatever mechanism is
decided. Quite how to implement this without an extra pass is beyond me.

regards
--
Steve Holden                                 http://www.holdenweb.com/
Python Web Programming                http://pydish.holdenweb.com/pwp/


>





More information about the Python-Dev mailing list