Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10096
| Date | 2011-07-22 06:25 -0500 |
|---|---|
| From | Tim Chase <python.list@tim.thechases.com> |
| Subject | Re: [PyWart 1001] Inconsistencies between zipfile and tarfile APIs |
| References | <5fd8e664-c855-41a2-9d8b-36d4c486f0b9@n35g2000yqf.googlegroups.com> <20110722082611.GB3575@axis.g33x.de> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1360.1311333956.1164.python-list@python.org> (permalink) |
On 07/22/2011 03:26 AM, Lars Gustäbel wrote: > On Thu, Jul 21, 2011 at 08:46:05PM -0700, rantingrick wrote: >> Tarfile is missing the attribute "fp" and instead exposes a >> boolean "closed". This mismatching API is asinine! Both >> tarfile and zipfile should behave EXACTLY like file objects > > What do you prove when you say that tarfile has no "fp" > attribute? You're not supposed to use the tarfile's internal > file object, there is nothing productive you could do with > it. While I've needed access to such a fp object, it's been limited to cases where I passed a file-like object to the constructor instead of a path-name: tf = tarfile.open(fileobj=foo, ...) so I had access to "foo" without reaching into the tarfile/zipfile object for the internal fp. Usually this involves using a StringIO object or a temp-file that then gets cleaned up when complete. -tkc
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PyWart 1001] Inconsistencies between zipfile and tarfile APIs rantingrick <rantingrick@gmail.com> - 2011-07-21 20:46 -0700
Re: [PyWart 1001] Inconsistencies between zipfile and tarfile APIs Corey Richardson <kb1pkl@aim.com> - 2011-07-22 00:13 -0400
Re: Inconsistencies between zipfile and tarfile APIs rantingrick <rantingrick@gmail.com> - 2011-07-21 21:48 -0700
Re: Inconsistencies between zipfile and tarfile APIs Corey Richardson <kb1pkl@aim.com> - 2011-07-22 01:05 -0400
Re: Inconsistencies between zipfile and tarfile APIs rantingrick <rantingrick@gmail.com> - 2011-07-21 22:58 -0700
Re: Inconsistencies between zipfile and tarfile APIs Lars Gustäbel <lars@gustaebel.de> - 2011-07-22 10:49 +0200
Re: Inconsistencies between zipfile and tarfile APIs rantingrick <rantingrick@gmail.com> - 2011-07-22 10:38 -0700
Re: Inconsistencies between zipfile and tarfile APIs Terry Reedy <tjreedy@udel.edu> - 2011-07-22 01:45 -0400
Re: Inconsistencies between zipfile and tarfile APIs rantingrick <rantingrick@gmail.com> - 2011-07-21 23:40 -0700
Re: Inconsistencies between zipfile and tarfile APIs Corey Richardson <kb1pkl@aim.com> - 2011-07-22 03:19 -0400
Re: Inconsistencies between zipfile and tarfile APIs Terry Reedy <tjreedy@udel.edu> - 2011-07-22 15:33 -0400
Re: Inconsistencies between zipfile and tarfile APIs Ned Deily <nad@acm.org> - 2011-07-22 14:17 -0700
Re: Inconsistencies between zipfile and tarfile APIs Terry Reedy <tjreedy@udel.edu> - 2011-07-22 20:31 -0400
Re: Inconsistencies between zipfile and tarfile APIs Ryan Kelly <ryan@rfk.id.au> - 2011-07-22 15:56 +1000
Re: [PyWart 1001] Inconsistencies between zipfile and tarfile APIs Lars Gustäbel <lars@gustaebel.de> - 2011-07-22 10:26 +0200
Re: Inconsistencies between zipfile and tarfile APIs rantingrick <rantingrick@gmail.com> - 2011-07-22 10:11 -0700
Re: Inconsistencies between zipfile and tarfile APIs Chris Angelico <rosuav@gmail.com> - 2011-07-23 03:23 +1000
Re: Inconsistencies between zipfile and tarfile APIs Chris Angelico <rosuav@gmail.com> - 2011-07-23 03:25 +1000
Re: [PyWart 1001] Inconsistencies between zipfile and tarfile APIs Thomas Jollans <t@jollybox.de> - 2011-07-22 12:31 +0200
Re: [PyWart 1001] Inconsistencies between zipfile and tarfile APIs Tim Chase <python.list@tim.thechases.com> - 2011-07-22 06:25 -0500
Re: [PyWart 1001] Inconsistencies between zipfile and tarfile APIs Terry Reedy <tjreedy@udel.edu> - 2011-07-22 15:49 -0400
csiph-web