Facundo Batista added the comment:

You migrated only of Python version, or also of windows installation?

I checked Py25 and Py23 in my Win 2k, and in both I have the same behaviour:

C:\Python23>python
Python 2.3.5 (#62, Feb  8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.stat("nul")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
OSError: [Errno 22] Invalid argument: 'nul'
>>> os.path.exists("nul")
False
>>>

I checked the os.stat() function because the documentation says that if
it gives an error, exists() will return False (and that this is how it's
implemented).

BTW, note that if you call to the GetFileAttributesEx() function of
kernel32.dll by yourself, it will give error for the "NUL" file, showing
that it actually does not exist.

Because of this, I'd say that current behaviour of os.exists() is ok,
but I want to know the answer of my question regarding your change
before closing this as not-a-bug.

Thanks!

----------
nosy: +facundobatista

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1311>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to