urlretrieve hangs on large files (sometimes)

Marcin Ciura ciuraNOSPAM at zeus.polsl.gliwice.pl
Mon Sep 20 16:23:17 EDT 2004


Josh wrote:
> Hi.  I am writing a script that downloads lots of zips from a usgs site. 
>  All is going well except that occasionally, in the midst of downloading 
> a file, the script just hangs and i must either ctrl-break it (running 
> from command line) or, if I wait about 20 minutes after it hangs, even 
> that won't allow me to close it.  Either way, I must then restart the 
> program and have it pick up where it left off.

Use socket.setdefaulttimeout().
   Marcin




More information about the Python-list mailing list