> os.path.exists(path) returns false when the path actually exists!
>  
>  When I do this:
>  
>  >>> os.path.exists("c:\\winnt\\file_name")
>  
>   I get this:
>  >>> False
>  
>  Actually the file exists in c:\winnt, and I can confirm it exists
> there, but os.path.exists isn't returning True, when it should be.. 
>  Is this a bug ?

>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?
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to