How can I determine an HTTPMessage ?

Kevin programming_kev at yahoo.com
Thu Jan 19 11:01:20 EST 2006


Thanks,  I was trying to get it to work with urllib instead of urllib2.
 The code below works.  Thanks.

import urllib2 as myurl

url = "some url"

try:
        myurl.urlopen(url)
        print "Redirecting to %s\n" % url
        return url
    except:
        print "An invalid login_query was specified.  Redirecting to
prefedit.psp with an error message.\n"
        return "prefedit.psp?uname=%s&err=Invalid%%20login%%20query."
%(username)




More information about the Python-list mailing list