checking for file existance
Oleg Broytmann
phd at phd.russ.ru
Wed Jan 12 08:26:54 EST 2000
On Wed, 12 Jan 2000, Anders M Eriksson wrote:
> How do I check if a file exist on a webserver? I have tried
> urllib.urlopen() but it never give any exception IOError.
There is no such thing as "file-by-WWW". URL gives you a reference to an
object, and if a WWW server can't resolve the reference, it is not
mandatory to return the error 404 - WWW server may decide to return another
object (a page with words and picture saying you have got an error).
Oleg.
----
Oleg Broytmann Foundation for Effective Policies phd at phd.russ.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list
mailing list