Why exception from os.path.exists()?

Chris Angelico rosuav at gmail.com
Sat Jun 2 07:28:41 EDT 2018


On Sat, Jun 2, 2018 at 9:13 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> On Sat, 02 Jun 2018 20:58:43 +1000, Chris Angelico wrote:
>
>>>> Windows isn't POSIX compliant.
>>>
>>> Technically, Windows is POSIX compliant. You have to turn off a bunch
>>> of features, turn on another bunch of features, and what you get is the
>>> bare minimum POSIX compliance possible, but it's enough to tick the
>>> check box for POSIX compliance.
>>
>> Really? I didn't know that Windows path names were POSIX compliant. Or
>> do you have to use the Cygwin fudge to count Windows as POSIX? And what
>> about POSIX signal handling?
>>
>> Citation needed, big-time.
>
> https://en.wikipedia.org/wiki/Microsoft_POSIX_subsystem
>
> https://technet.microsoft.com/en-us/library/bb463220.aspx
>
> https://brianreiter.org/2010/08/24/the-sad-history-of-the-microsoft-posix-
> subsystem/

Can someone confirm whether or not all the listed signals are actually
supported? We know that Ctrl-C maps to the internal Windows interrupt
handler, and "kill process" maps to the internal Windows "terminate",
but can you send a different process all the different signals and
handle them differently?

I also can't find anything about path names there. What does POSIX say
about the concept of relative paths? Does Windows comply with that?

"Windows has some features which are compatible with the equivalent
POSIX features" is not the same as "Technically, Windows is POSIX
compliant".

ChrisA



More information about the Python-list mailing list