[ python-Patches-1731720 ] urllib.urlretrieve/URLopener.retrieve - 'buff' argument

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.python.patches
Message-ID <[email protected]>
Patches item #1731720, was opened at 2007-06-05 22:24
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1731720&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Dariusz Suchojad (dsuch)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib.urlretrieve/URLopener.retrieve - 'buff' argument

Initial Comment:
Hello,

attached is a tiny patch which adds to urllib.urlretrieve and urllib.URLopener.retrieve
an optional 'buff' argument, which should be a file-like object 
(e.g. a StringIO instance). I don't have any performance issues with creating
temporary files (right now, anyway..) but it would be nice if I could pass my 
own objects for those methods to write to.

Optionally, it could also raise an exception (ValueError?) if neither 'filename'
nor 'buff' were given on input.

Diffed against today's trunk.

What do you think? Make sense?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1731720&group_id=5470
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.