threads and urllib
missive at frontiernet.net
Sat Feb 23 02:03:30 CET 2002
>> > self.webpage = urllib.urlopen(self.url).read()
>> Yes, this can cause Python to hang (thread passim).
>> It *seems* that using httplib() instead *might* avoid the hang.
>> Andrew ward
> it seems i might be having the same sort of problem...
> i am writing a special (http) server using SimpleHTTPServer and when i
> try to read from do_POST, it hangs...
Which version of python are you using?
I was trying to implement a program which was interactive, and
used urllib in the background to transfer data to and from a
With python2.1, urllib locked the system up completely until
it received a response.
Looking around on the web, I found there had been a bug report
about this just before 2.2, so I upgraded. It is much better, but
still not quite there for my application. Possibly on a faster
machine it would not be an issue.
Something to try, anyhow.
More information about the Python-list