[Tutor] os.path.exists(path) returns false when the path actually exists!

Iyer maseriyer at yahoo.com
Sat Jul 28 04:42:25 CEST 2007


Adam wrote:

>From the library documentation:
Return True if path refers to an existing path. Returns False for
broken symbolic links. On some platforms, this function may return
False if permission is not granted to execute os.stat() on the
requested file, even if the path physically exists.

So the better question is, does is this file a broken symbolic link or
can os.stat() be executed on it?

How do I find if it is a broken symbolic link in Windows 2000 ? 

os.stat(path) returns an OSError saying that there is no such file or directory

       
---------------------------------
Shape Yahoo! in your own image.  Join our Network Research Panel today!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070727/189211f6/attachment.htm 


More information about the Tutor mailing list