urlretrieve can't send headers
triplezone3
triplezone3 at yahoo.co.uk
Sat Apr 19 14:19:45 EDT 2008
I have looked in to urllib2, and I can't find a
function which would allow me to get the progress of
the download as it happens, bit by bit, like
urlretrieve does, at least not easily.
urllib.urlretrieve's returnhook is just handy.
I have another question concerning urlretrieve, is
there a way I can force it to stop downloading
half-way, say after the user clicked cancel? Thanks in
advance.
--- "Diez B. Roggisch" <deets at nospam.web.de> wrote:
> triplezone3 schrieb:
> > Hello. I'm using urllib.urlretrieve to download
> files,
> > because it provides a handy hook function.
> > Unfortunately, it won't let me send headers, which
> > could be quite useful. Is there any way I could do
> > this?
>
> I suggest you look into urllib2. It allows you to
> explicitly create an
> request-object that you can stuff with headers and
> parameters and what
> you like.
>
> diez
> --
> http://mail.python.org/mailman/listinfo/python-list
>
___________________________________________________________
Yahoo! For Good helps you make a difference
http://uk.promotions.yahoo.com/forgood/
More information about the Python-list
mailing list