access()

Gordon McMillan gmcm at hypernet.com
Tue Feb 22 08:09:35 EST 2000


london999 wrote:
> I am trying to use access() in the os module. The online documentation
> shows access(path,mode).
> I don't know what value to put for mode. Tried os.X_OK, X_OK,"X_OK" and
> always get  "exceptions.AttributeError".

os.access(<path>, os.X_OK) works for me.

> Where do I look up the possible values and why aren't they on the
> access() html page?

Because it wraps the c runtime routine of the same name, so 
man access will tell you what you need to know.

- Gordon




More information about the Python-list mailing list