[Python-Dev] PEP 397 (Python launcher for Windows) reference implementation
vinay_sajip at yahoo.co.uk
Fri Jul 1 18:17:03 CEST 2011
Mark Hammond <skippy.hammond <at> gmail.com> writes:
> Sure, that would be awesome! I think that will mean your impl is fairly
> close to the first draft of the PEP I checked into HG, which is nice and
> still quite useful to use :)
My C implementation of the launcher is now available at
It's been built using VS 2008, and tested on Windows 7 (32-bit) with
ActivePython 184.108.40.206 and ActivePython 220.127.116.11 installed.
I've added support for .ini files [commands] section; I haven't looked at
implementing [defaults] yet.
There's incomplete support for -32 suffix at the moment - that can be looked at
in due course.
A couple of points:
I've also allowed for /usr/local/bin/python as a built-in command, this can
always be removed later if YAGNI.
I've assumed that if a customised command is provided with arguments in the
shebang line, these will be ignored - if people want to run with different
options they can always define more customised commands. If you agree with this,
the PEP should probably explicitly state this.
In a couple of cases I've implemented using fixed size arrays - for the lists of
installed Pythons and customised commands. Of course these can be made dynamic,
but what's there is good enough for the moment for exploration.
Do have a play, and let me know what you think.
More information about the Python-Dev