473,395 Members | 1,675 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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
1 2071
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Volker M. | last post by:
Hey, I want to open a list of URLs with Pythons urllib and the fuction open(URL) automatically. It is important that the program open ONLY normal http-sites and no https-sites with...
11
by: Pater Maximus | last post by:
I am trying to implement the recipe listed at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/211886 However, I can not get to first base. When I try to run import urllib...
0
by: Pieter Edelman | last post by:
Hi all, I'm trying to submit some data using a POST request to a HTTP server with BASIC authentication with python, but I can't get it to work. Since it's driving me completely nuts, so here's...
1
by: Timothy Wu | last post by:
Hi, I'm trying to fill the form on page http://www.cbs.dtu.dk/services/TMHMM/ using urllib. There are two peculiarities. First of all, I am filling in incorrect key/value pairs in the...
3
by: Chris Tavares | last post by:
Hi all. I'm currently tracking down a problem in a little script I have, and I was hoping that those more experienced than myself could weigh in. The script's job is to grab the status page off a...
4
by: william | last post by:
I've got a strange problem on windows (not very familiar with that OS). I can ping a host, but cannot get it via urllib (see here under). I can even telnet the host on port 80. Thus network...
3
by: bowman.joseph | last post by:
Hi, I'm new to python. I've been handed the job of modifying a script we have here at work that pulls content from a zope site, to create static html. They wanted a check to make sure the...
1
by: evanpmeth | last post by:
I have tried multiple ways of posting information to a website and have failed. I have seen this problem on other forums can someone explain or point me to information on how POST works through...
4
by: kgrafals | last post by:
Hi, I'm just trying to read from a webpage with urllib but I'm getting IOErrors. This is my code: import urllib sock = urllib.urlopen("http://www.google.com/") and this is the error:
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.