[issue11980] zipfile.ZipFile.write should accept fp as argument

2016-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: A more general feature is implemented in issue26039. Now you can write to ZIP archive the content of opened file object with following two lines: with zipf.open('file.txt', 'wb') as target: shutil.copyfileobj(source, target) -- re

[issue11980] zipfile.ZipFile.write should accept fp as argument

2012-04-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue11980] zipfile.ZipFile.write should accept fp as argument

2011-05-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: zipfile.ZipFile takes a file arg that can be a 'path to a file (a string) or a file-like object'. The .write() method takes a filename arg. I would think that the proposal should be what the title says, to expand that to a file arg, either a path or 'file', a

[issue11980] zipfile.ZipFile.write should accept fp as argument

2011-05-03 Thread Johan Euphrosine
Johan Euphrosine added the comment: Here is a tentative implementation. Feel free to review it. -- keywords: +patch Added file: http://bugs.python.org/file21871/zipfile-add-writefp.patch ___ Python tracker __

[issue11980] zipfile.ZipFile.write should accept fp as argument

2011-05-02 Thread Johan Euphrosine
New submission from Johan Euphrosine : Currently it only accept a filename (and writestr only accept bytes). -- components: Library (Lib) messages: 134989 nosy: Johan.Euphrosine priority: normal severity: normal status: open title: zipfile.ZipFile.write should accept fp as argument type: