Re: os.path query functions behavior incorrect?

2005-04-05 Thread Simon Percivall
> These to me are I/O errors that should result in an exception. > Doing a command line dir a:\ reports "The system cannot find > the path specified." The functions use the underlying C library, and in this case, the result is not guaranteed by the standard. -- http://mail.python.org/mailman/lis

Re: os.path query functions behavior incorrect?

2005-04-05 Thread Georg Brandl
[EMAIL PROTECTED] wrote: > It works fine under linux > [EMAIL PROTECTED]:~ $ python > Python 2.3.4 (#2, Feb 2 2005, 11:10:56) > [GCC 3.3.4 (Debian 1:3.3.4-9ubuntu5)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. import os.path os.path.exists('/blah')

Re: os.path query functions behavior incorrect?

2005-04-05 Thread [EMAIL PROTECTED]
It works fine under linux [EMAIL PROTECTED]:~ $ python Python 2.3.4 (#2, Feb 2 2005, 11:10:56) [GCC 3.3.4 (Debian 1:3.3.4-9ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os.path >>> os.path.exists('/blah') False >>> os.path.isdir('/blah') Fals

Re: os.path query functions behavior incorrect?

2005-04-05 Thread Mike Rovner
Beman Dawes wrote: So are these os.path functions specified and implemented incorrectly? Should they instead throw exceptions for the above examples? Works for me. (Win XP SP2, Py 2.4, only have c and d drives) >>> os.path.exists('d:\\') True >>> os.path.exists('e:\\') False >>> os.path.exists('a:

os.path query functions behavior incorrect?

2005-04-05 Thread Beman Dawes
The docs for os.path.exists(), isdir(), and the like, do not describe behavior when an I/O error occurs. Testing on Windows XP SP2 with Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32, on a machine with no a: drive, c: is a hard disk with a top level directory nam