[Python-Dev] Draft PEP and reference implementation of a Python launcher for Windows

"Martin v. Löwis" martin at v.loewis.de
Mon Mar 21 01:10:41 CET 2011


Am 21.03.2011 00:52, schrieb Mark Hammond:
> On 21/03/2011 10:32 AM, "Martin v. Löwis" wrote:
>>> The above raises an interesting question - if the launcher executed
>>> Python in-process, what would sys.executable be?  I can imagine there
>>> are few scenarios where it would be desirable to have it refer to the
>>> launcher and a number of scenarios where it would be undesirable and
>>> possibly break existing scripts.
>>
>> Interesting question. What is it in COM and ISAPI applications?
> 
> ISAPI isn't a good example - that uses DLLs. 

Actually, this is precisely the example i was looking at.

> For COM objects hosted in
> a .exe it will be pythonw.exe.  For Windows services it will be
> pythonservice.exe (which is part of pywin32 and is located simply by
> assuming it is next to win32service.pyd)
> 
> Regardless, I don't think they are very likely to break - my concern is
> more for "normal" scripts which construct a child process cmdline/argv
> using sys.executable...

If we find out how other cases of just loading the DLL deal with
sys.executable, it may help us in guiding how it should be set in the
launcher.

Regards,
Martin


More information about the Python-Dev mailing list