[Tutor] os.access(), problems with mode variable
python at bernardlebel.com
Tue Aug 17 16:32:41 CEST 2004
Trying to test the existence of a file, using the access function from the
In the documentation it is said to use F_OK as the mode for such thing.
However when I run the code below, I get a "NameError: name 'F_OK' is not
sPath = 'C:\\file.txt'
if os.access( sPath, F_OK ) == 1:
Thanks in advance
More information about the Tutor