At 05:31 PM 9/11/2008, Kent Johnson wrote:
On Thu, Sep 11, 2008 at 10:56 AM, Oleg Oltar <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I need to open about 1200 urls from my database. And to check that those
> urls are really exists.
>
> I used urllib2.urlopen for it. But it's a little bit slow. I thought that
> it's might be a good idea to do it in a threads. So it can add some
> performance to my code.
>
> Unfortunately I can't get started with the treading module.  There are no
> simple examples in the python docs. Not sure how to start.

There are some good examples of threading in the Python cookbook, or this one:
http://www.chrisarndt.de/projects/threadpool/

This may be of use: < http://blog.doughellmann.com/2008/01/pymotw-threading_13.html>

Dick Moores

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to