467,150 Members | 1,147 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,150 developers. It's quick & easy.

urllib.urlopen unwanted password prompts - documentation problem

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...ner-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
Dec 27 '06 #1
  • viewed: 1853
Share:
1 Reply
John Nagle <na***@animats.comwrites:
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.
[...]

Bug reports tend not to result in a fix being applied unless the
reporter him/herself actually goes to the trouble of filing a patch at
sourceforge.net :

http://sourceforge.net/tracker/?grou...70&atid=305470
John
Dec 27 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Volker M. | last post: by
11 posts views Thread by Pater Maximus | last post: by
reply views Thread by Pieter Edelman | last post: by
1 post views Thread by Timothy Wu | last post: by
3 posts views Thread by Chris Tavares | last post: by
4 posts views Thread by william@opensource4you.com | last post: by
3 posts views Thread by bowman.joseph@gmail.com | last post: by
1 post views Thread by evanpmeth@gmail.com | last post: by
4 posts views Thread by kgrafals@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.