By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,732 Members | 1,461 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,732 IT Pros & Developers. It's quick & easy.

Re: urlretrieve can't send headers

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.