In message <[EMAIL PROTECTED]>, Anoop
wrote:

> Please tell me how to check the existence of a file and the read
> permission to the file using python script

Without knowing what your precise needs are, the best way is to open the
file and try to read from it. If that succeeds, then you've got read
access.

Checking permissions as a separate step from opening the file exposes your
code to a race condition where the permissions may be OK during the initial
check, but then change to deny access before the subsequent open.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to