I'll quote from the urllib2 examples:
>>>
Here we are sending a data-stream to the stdin of a CGI
and reading the data it returns to us:
>>> import urllib2
>>> req =
urllib2.Request(url='https://localhost/cgi-bin/test.cgi',
... data='This data is passed to
stdin of the CGI')
>>> f = urllib2.urlopen(req)
...
<<<
urllib2 returns:
urllib2.URLError: <urlopen error unknown url type: https>
(This is the Errormsg in 2.3.3, 2.2.3 is a different
syntax but says the same. This is seriously misleading,
as it implies that somehow urllib2 can handle https,
which it can't in this manner. At least not in the way
exampled here.
Please correct or delete this example.
It would be nice if you could provide a working example
for handling https. Examples are a good thing in the
whole httplib / urllib / urllib2 area, since it appears
somewhat hard to overlook.
I'm sorry I can't provide a working version of this
example, as I am trying to figure out how to handle
https myself.
Anyway, it's a documentation bug and needs fixing.
Thanks.
|