Tim Golden <m...@timgolden.me.uk> added the comment:

import nt, sys; assert 
sys.executable.startswith(nt._getvolumepathname(sys.executable))

This code fails only when run from the python.bat as created by 
pcbuild\build.bat. The obvious difference is that the batch file sets 
PYTHONHOME which, presumably, is used to form sys.executable (haven't checked 
the startup code yet).

The docs for GetVolumePathName [*] don't specify that the drive letter of the 
path returned will be upper-case, but it doesn't seem unlikely.

So... it looks as though the test is unduly sensitive to case-differences in 
the face of something like PYTHONHOME which affects the way in which 
sys.executable is formed.

Phew! I'll put a test patch together later...

[*] 
https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getvolumepathnamew

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34195>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to