Re: dictionaries and threads

2005-06-02 Thread Bloke
thanks. Looks good. -- http://mail.python.org/mailman/listinfo/python-list

Re: dictionaries and threads

2005-06-02 Thread Bloke
I've been trying to find a Python tutorial on threading - does anyone have a reference? Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: SSL (HTTPS) with 2.4

2005-05-26 Thread Bloke
OK. I try pyopenssl and can get a secure socket to the server, but am unsure how to use this socket with urllib2 or even httplib. Here's the code I'm using: import sys, socket, string, base64, httplib from OpenSSL import SSL # Connects to the server, through the proxy def run(server, proxy):

Re: SSL (HTTPS) with 2.4

2005-05-22 Thread Bloke
Andrew and John, Any chance of you sending me your code to have a look at? Rob -- http://mail.python.org/mailman/listinfo/python-list

Re: SSL (HTTPS) with 2.4

2005-05-19 Thread Bloke
n with the web site, and only then do you pass the url to the proxy. Bloke -- http://mail.python.org/mailman/listinfo/python-list

Re: SSL (HTTPS) with 2.4

2005-05-19 Thread Bloke
Andrew, It seems I'm not the only one going nuts here. I have just spent the last 4 hrs stepping through the code in the debugger. It seems to get stuck somewhere in the socket module (when it calls ssl) but haven't as yet figured out exactly where. I am _very_ interested to find that you have

urllib2 EOF occurred in violation of protocol with proxy

2005-05-19 Thread Bloke
I want to connect to a https server through an authenticating proxy like this: import urllib2 proxy_info = { 'user' : 'me', 'pass' : 'password', 'host' : 'mycompany.com.au', 'port' : 8008 } # build a new opener that uses a proxy requiring authorization proxy_support = urllib2.Pr

Re: SSL (HTTPS) with 2.4

2005-05-18 Thread Bloke
Thanks Martin. The problem seems to lie with our company proxy (which requires authentication). I have tried retrieving the page on another network with a transparent proxy, and it all works fine. Unfortnately, any https page I try to retrieve on the company network fails in this way with after

Re: SSL (HTTPS) with 2.4

2005-05-18 Thread Bloke
Following my above comment, if my script works with http, then what is the problem with https, even when I change the ProxyHandler to specify https? -- http://mail.python.org/mailman/listinfo/python-list

Re: SSL (HTTPS) with 2.4

2005-05-18 Thread Bloke
I just tried the https connection through a friends internet connection which uses a transparent proxy as follows: import urllib2 f = urllib2.urlopen('https://www.directshares.com.au/') print f.headers print f.read() f.close() This works fine. So it must be a problem with either the proxyhandler

Re: SSL (HTTPS) with 2.4

2005-05-18 Thread Bloke
Yes, on looking into it, sockets.ssl is not installed with activepython, so it doesn't recognise https. So I have removed it, and reinstalled the v 2.4.1 which I downloaded from www.python.org . This leaves me with with the problem where the script 'hangs' for a long time, then returns: Traceba

Re: SSL (HTTPS) with 2.4

2005-05-18 Thread Bloke
wn url type: %s' % type) URLError: I'm getting a bit frustrated. Do I need to import another library? Any advise is appreciated. Bloke. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to learn OO of python?

2005-05-18 Thread Bloke
The best one I found was Dive Into Python - and it's free http://www.diveintopython.org/ Also, How to Think Like a computer scientist - can't remember the link. Bloke -- http://mail.python.org/mailman/listinfo/python-list

Re: SSL (HTTPS) with 2.4

2005-05-17 Thread Bloke
it urllib2.install_opener(opener) # use it f = urllib2.urlopen('https://www.directshares.com.au') print f.headers f.close() Any ideas what is wrong? Bloke -- http://mail.python.org/mailman/listinfo/python-list

SSL (HTTPS) with 2.4

2005-05-17 Thread Bloke
Hi all. Some time ago (years) I had a script on Python 2.2 that would retieve a HTTPS web site. I used python22-win32-ssl.zip to handle the SSL aspect and it worked wonderfully. I am revisiting the project and need to update it to Python 2.4.1. python22-win32-ssl.zip isn't compatable (duh) and