How do I gracefully interrupt urllib2 downloads?

Viewed 2707

I am using urllib2's build_opener() to create an OpenerDirector. I am using the OpenerDirector to fetch a slow page and so it has a large timeout.

So far, so good.

However, in another thread, I have been told to abort the download - let's say the user has selected to exit the program in the GUI.

Is there a way to signal an urllib2 download should quit?

4 Answers
Related