[Tutor] How to use urllib2.https_open with SSL support in Windows XP for python 2.5.2

arsyed arsyed at gmail.com
Tue Aug 19 10:39:30 CEST 2008


On Mon, Aug 18, 2008 at 9:26 PM, xbmuncher <xboxmuncher at gmail.com> wrote:
>
>
> On Mon, Aug 18, 2008 at 8:44 PM, Kent Johnson <kent37 at tds.net> wrote:
>>
>> On Mon, Aug 18, 2008 at 12:40 PM, xbmuncher <xboxmuncher at gmail.com> wrote:
>> > I wanted to use the urllib2.https_open()  but it said the module did not
>> > exist.
>>
>> I'm not aware of a urllib2.https_open() function. I think you just
>> give an https url to urllib2.urlopen(). Can you show us your actual
>> code and error message?
>>
>> Kent
>
> http://docs.python.org/lib/https-handler-objects.html
> I accessed it like this:
> urllib2.https_open(req)
>
> Its probably the syntax formation of using this https functionality that I
> have wrong. Maybe you can show me how.
>

That method is part of the HTTPSHandler class as the docs page you
cited implies.  I believe this is what urllib2.urlopen instantiates
once it parses your URL and notices the "https" scheme.  You don't
need to instantiate that handler and invoke that method directly.


More information about the Tutor mailing list