[Python-Dev] Special file "nul" in Windows and os.stat

Terry Reedy tjreedy at udel.edu
Wed Nov 7 07:36:27 CET 2007


""Martin v. Löwis"" <martin at v.loewis.de> wrote in message 
news:4730C271.8010908 at v.loewis.de...
|> If yes, we have three paths to follow... leave 2.5 as is and say that
| > the behaviour change is ok (windows fault), change 2.5 to use the same
| > API than 2.4 and get the same behaviour, or hardwire the behaviour for
| > this set of special files...
|
| As you said before, we should avoid hardwiring things.
|
| > What do you think we should do?
|
| I think we should try to follow the behavior of 2.4. To do that, we
| still have to find out what precisely the behavior of 2.4 is (and
| then perhaps we might decide to not follow it when we know what it
| is).
|
| Unfortunately, it seems that none of us is both capable and has
| sufficient time to research what the 2.4 behavior actually is;
| I'd like to emphasize that I think no changes should be made until
| the behavior is fully understood, which it currently isn't.
|
| So I suggest to take no action until somebody comes along who
| has both the time and the knowledge to resolve the issue.

Perhaps a note should be added to the docs that the 'existence' of 'nul', 
etc, is inconsistent in Windows and hence, at present, in Python.

In part, it seems to me, that anyone doing Windows-specific stuff should 
decide for themselves whether 'nul' exists for their purposes or not. 
Hence the problem should only arise when receiving a filename from an 
external source.  Maybe the special Windows module should have an 
'isdevice' function if it does not already to test such.

I agree that there are more generally useful things for you to do.  Windows 
is sometimes a maddening platform to work on.

tjr





More information about the Python-Dev mailing list