469,352 Members | 1,788 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

Re: urlretrieve can't send headers

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" <de***@nospam.web.dewrote:
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/
Jun 27 '08 #1
0 818

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Josh | last post: by
6 posts views Thread by Sven | last post: by
1 post views Thread by triplezone3 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.