How to detect the presence of a html file
Phoe6
orsenthil at gmail.com
Fri Dec 9 13:45:41 EST 2005
Operating System: Windows
Python version: 2.4
I have bookmarks.html and wumpus.c under my c:
When I tried to check the presence of the bookmarks.html, I fail.
>>> os.path.isfile('c:\bookmarks.html')
False
>>> os.path.isfile('c:\wumpus.c')
True
>>> os.path.exists('c:\wumpus.c')
True
>>> os.path.exists('c:\bookmarks.html')
False
>>> os.access('c:\bookmarks.html',os.F_OK)
False
I can assure you that c:\bookmarks.html exists! and I opened this and
checked it in the browser as well.
Why is this behavior? And How Should I check for the presence of this
file?
Any help appreciated.
Thanks!
Senthil
More information about the Python-list
mailing list