[Python-Dev] PEP 397 - Last Comments

Brian Curtin brian at python.org
Tue Jun 19 17:13:28 CEST 2012


On Tue, Jun 19, 2012 at 1:30 AM, "Martin v. Löwis" <martin at v.loewis.de> wrote:
>> Agreed, I would expect the same. I would think taking out the word
>> "only" and then flipping newer and older in the sentence would correct
>> it.
>
> Will change.
>
>>> "On 64bit Windows with both 32bit and 64bit implementations of the same
>>> (major.minor) Python version installed, the 64bit version will always be
>>> preferred.  This will be true for both 32bit and 64bit implementations of
>>> the launcher - a 32bit launcher will prefer to execute a 64bit Python
>>> installation of the specified version if available."
>>>
>>> This implies to me that the 32bit installation *will* install a 32bit
>>> launcher and that there could be both versions of the launcher installed.
>
> No - this paragraph talks about the Python being launched, not the
> bitness of the launcher. As (currently) the launcher creates a
> subprocess always, this is quite feasible.
>
> The bitness of the launcher really doesn't matter, except that a 32-bit
> launcher cannot access all directories, and a 64-bit launcher does not
> work on a 32-bit system.
>
> Now that I think about it, it might be that it's best to always have the
> launcher as a 32-bit binary. It could disable the filesystem and
> registry redirection if it really wanted to, and would work on both
> 32-bit and 64-bit systems.

Always doing a 32-bit binary seems like a better move to me.

>> I took that as covering an independently-installed launcher.
>>
>> You could always install your own 32-bit launcher, and it'd prefer to
>> launch a binary matching the machine type.
>
> No, that's not the plan. The binary being launched is entirely
> controlled by command line arguments, ini files, and shebang lines.
>
> I personally find it sad that it always creates a subprocess, and it
> could avoid doing so if the launched Python has the same bitness, but
> alas, the problems with doing so are mostly convincing.
>
>> So yes, there could be
>> multiple launchers installed for different machine types, and I'm not
>> sure why we'd want to (or how we could) prevent people from installing
>> them. You could have a 64-bit launcher available system-wide in your
>> Windows folder, then you could have a 32-bit launcher running out of
>> C:\Users\Terry for some purposes.
>
> The PEP doesn't really consider launcher binaries not installed into
> the standard location. It would work, but it's out of scope of the PEP.
>
> The PEP actually only talks about launcher binaries in c:\windows, and
> essentially says that they must match the bitness of the system.

True, got it.

>> My only additional comment would be to have the "Configuration file"
>> implementation details supplemented with a readable example of where
>> the py.ini file should be placed. On my machine that is
>> "C:\Users\brian\AppData\Local", rather than making people have to run
>> that parameter through the listed function via pywin32.
>
> Will do.
>
> Martin


More information about the Python-Dev mailing list