Patches item #1731720, was opened at 2007-06-05 22:24
Message generated for change (Comment added) made by dsuch
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?

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

>Comment By: Dariusz Suchojad (dsuch)
Date: 2007-06-06 08:34

Message:
Logged In: YES 
user_id=954779
Originator: YES

Uh, of course I meant the other way around - it could raise an exception
if both 'filename' and 'buff' were given on input.

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

Comment By: Dariusz Suchojad (dsuch)
Date: 2007-06-05 22:25

Message:
Logged In: YES 
user_id=954779
Originator: YES

Adding a diff.
File Added: test_urllib.py.diff

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1731720&group_id=5470
_______________________________________________
Patches mailing list
Patches@python.org
http://mail.python.org/mailman/listinfo/patches

Reply via email to