Why exception from os.path.exists()?

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sat Jun 2 20:08:40 EDT 2018


On Sat, 02 Jun 2018 21:28:41 +1000, Chris Angelico wrote:

> 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? 

Unless people do their testing under Windows with the POSIX subsystem 
installed, such testing is likely to fail.


> 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?

That's a curious question to ask. If you don't know what POSIX says about 
a feature, why would you question whether Windows complies with it?


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

Chris, you seem to be labouring under the misapprehension that the claim 
is that a stock standard Windows <whatever version> installation complies 
with the latest version of the POSIX standard.

That's not the case.

The claim (and fact) is that Windows NT with the POSIX subsystem 
installed (and possibly other changes made) is technically compliant with 
version 1 of the POSIX standard, which even in 1997 was only a fraction 
of what most Unix systems provided.

https://en.wikipedia.org/wiki/POSIX#Versions

Just enough to allow bean counters to tick the box that says "POSIX 
compliant" in a government requirements form, provided the technical 
people involved either don't get a say, or do get a say and actually want 
Windows but have to satisfy some bureaucratic requirement for POSIX.

Nobody thinks that standard Windows counts as a Unix.



-- 
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson




More information about the Python-list mailing list