Hello [EMAIL PROTECTED],
import urllib url_opener = urllib.URLopener() # create URLopener #You could also work with urllib.FancyURLopener try: data = url_opener.open("http://www.somedomain.com/index.html") # open index.html except IOError, error_code: if error_code[0] == "http error": if error_code[1] == 301: #do something here if error_code[2] == 302: #do something here I hope that's of some help! I think you may want to delve deeper into FancyURLopener...
The problem is that I'm using a subclass of FancyOpener and it doesn't raise those exceptions.
-- http://mail.python.org/mailman/listinfo/python-list