Re: os.path query functions behavior incorrect?
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:\\') False -- http://mail.python.org/mailman/listinfo/python-list
Re: os.path query functions behavior incorrect?
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') False os.path.isdir('/home/martin') True os.path.exists('/home/martin') True -- http://mail.python.org/mailman/listinfo/python-list
Re: os.path query functions behavior incorrect?
[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') False os.path.isdir('/blah') False os.path.isdir('/home/martin') True os.path.exists('/home/martin') True Of course it does. This is not a problem with Unix-style filesystems because there a directory either exists or not. However, under Windows, the drive letters for floppies or CDs exists even if there is no media inserted. It is, of course, questionable whether isdir() and exists() should return True in this case. mfg Georg -- http://mail.python.org/mailman/listinfo/python-list