Mark Grandi added the comment:

I still don't see why TarFile.add() can't be changed to accept a file like 
object so users don't have to fumble around with a TarInfo object when they 
just want add a file like object, and don't care about the permission bits and 
whatnot. It also says un the TarInfo section that you get those objects from 
gettarinfo(), and its not clear (at least to me) that you can just manually 
construct one, and that you only need the size property set.

I still the easiest way to solve this is to have gettarinfo() or add() accept 
file like objects that don't have file descriptors, as it would go a long way 
to simplifying the use of this module as well. (in zip file you don't ever have 
to worry about ZipInfo objects unless you need them...)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22208>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to