A little disappointed so far

Skip Montanaro skip at pobox.com
Sun May 18 21:20:54 EDT 2003


    >> Is there an equivalent of [ -f $filename ] to test for the existence
    >> of filename in Python?  Things like this seem essential for a shell
    >> tool language.

    Erik> os.access would probably be the most obvious function.  

But wrong. ;-) os.access is almost never what you want.  Try
os.path.exists() instead.

Skip





More information about the Python-list mailing list