How can I check 4 readonly?

Franz GEIGER fgeiger at datec.at
Thu Aug 3 13:56:18 EDT 2000


I am desperatly trying to retrieve something like a readonly flag on files.
os.stat("file.txt")[ST_MODE] returns the value of st_mode, but there is no
S_-function like S_ISDIR() to check for a readonly flag. O_RDONLY is only
for opening() files (its value is 0). Any idea?

Platform: Python 1.5.2 on NT4.

Many thanks in advance and best regards
Franz GEIGER






More information about the Python-list mailing list