Urllib with incorrect authentication

Bruce Southey southey at uiuc.edu
Wed May 29 17:39:02 EDT 2002


Hi,
I am using urllib to access a password protected site in a cgi script
as:

page=urllib.urlopen('http://username:password@somesite','some
parameters')

This works very nicely except when username/password combinations are
wrong.

How to do I override the default prompt when the username/password are
invalid?

Thanks,
Bruce Southey





More information about the Python-list mailing list