urllib.urlopen unwanted password prompts - documentation problem

John Nagle nagle at animats.com
Wed Dec 27 16:22:03 EST 2006


   If you try to open a password protected page with "urllib.urlopen()", you get

	"Enter username for EnterPassword at example.com:"

on standard output, followed by a read for input!  This seems to be an 
undocumented feature, if not a bug.  Definitely the documentation for
"urllib" should mention this.  The effects of this in a CGI program
are not good. 	

A workaround is described here: "http://cis.poly.edu/cs912/urlopen.txt"
"URLopener" and "FancyURLopener" in urllib have many overrideable
functions, none of which are documented at python.org and should be.

There was once documentation at

http://epydoc.sourceforge.net/stdlib/public/urllib.FancyURLopener-class.html

but its current status is:

An error has been encountered in accessing this page.

1. Server: epydoc.sourceforge.net
2. URL path: /stdlib/public/urllib.FancyURLopener-class.html
3. Error notes: File does not exist: 
/home/groups/e/ep/epydoc/htdocs/stdlib/public/urllib.FancyURLopener-class.html
4. Error type: 404
5. Request method: GET
6. Request query string:
7. Time: 2006-12-27 13:18:11 PST (1167254291)

Reporting this problem: The problem you have encountered is with a project web 
site hosted by SourceForge.net. This issue should be reported to the 
SourceForge.net-hosted project (not to SourceForge.net).

					John Nagle



More information about the Python-list mailing list