Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #86799 > unrolled thread

tarfile vs zipfile

Started bySeth P <seth-p@outlook.com>
First post2015-03-02 17:01 -0800
Last post2015-03-04 09:12 +0800
Articles 7 — 6 participants

Back to article view | Back to comp.lang.python


Contents

  tarfile vs zipfile Seth P <seth-p@outlook.com> - 2015-03-02 17:01 -0800
    Re: tarfile vs zipfile Ben Finney <ben+python@benfinney.id.au> - 2015-03-03 12:12 +1100
    Re: tarfile vs zipfile Terry Reedy <tjreedy@udel.edu> - 2015-03-02 21:29 -0500
    Re: tarfile vs zipfile Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-03-03 19:47 +1300
    Re: tarfile vs zipfile Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-03 07:26 +0000
      Re: tarfile vs zipfile Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-03-03 23:39 +1300
        Re: tarfile vs zipfile Marcos Almeida Azevedo <marcos.al.azevedo@gmail.com> - 2015-03-04 09:12 +0800

#86799 — tarfile vs zipfile

FromSeth P <seth-p@outlook.com>
Date2015-03-02 17:01 -0800
Subjecttarfile vs zipfile
Message-ID<97542b34-5381-48c2-93bb-755d4ac49369@googlegroups.com>
Is there a reason tarfile and zipfile don't use the same method/member names, where it makes sense?  Consider the following six methods/members, which I would expect to be the same (with the possible exception of mtime vs date_time, which are of different types).  It almost seems like someone went out of their way to make it difficult to use them interchangeably.

tarfile              zipfile
	
  TarFile              ZipFile
    getmember(name)      getinfo(name)
    getmembers()         infolist()
    getnames()           namelist()
	
  TarInfo              ZipInfo
    name                 filename
    mtime                date_time
    size                 file_size

[toc] | [next] | [standalone]


#86800

FromBen Finney <ben+python@benfinney.id.au>
Date2015-03-03 12:12 +1100
Message-ID<mailman.73.1425345148.13471.python-list@python.org>
In reply to#86799
Seth P <seth-p@outlook.com> writes:

> Is there a reason tarfile and zipfile don't use the same method/member
> names, where it makes sense?

One likely explanation is that the modules's APIs were designed by
different people unaware of the work of the other.

-- 
 \        “We have to go forth and crush every world view that doesn't |
  `\                believe in tolerance and free speech.” —David Brin |
_o__)                                                                  |
Ben Finney

[toc] | [prev] | [next] | [standalone]


#86803

FromTerry Reedy <tjreedy@udel.edu>
Date2015-03-02 21:29 -0500
Message-ID<mailman.76.1425349761.13471.python-list@python.org>
In reply to#86799
On 3/2/2015 8:12 PM, Ben Finney wrote:
> Seth P <seth-p@outlook.com> writes:
>
>> Is there a reason tarfile and zipfile don't use the same method/member
>> names, where it makes sense?

The situation is known to some core developers, but is hard to change now.

> One likely explanation is that the modules's APIs were designed by
> different people unaware of the work of the other.

Plus tartfiles come from unix world, whereas zip was used instead in 
Windows world.


-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#86819

FromGregory Ewing <greg.ewing@canterbury.ac.nz>
Date2015-03-03 19:47 +1300
Message-ID<cll3o7Fl3h2U1@mid.individual.net>
In reply to#86799
Seth P wrote:
> Is there a reason tarfile and zipfile don't use the same method/member names,
> where it makes sense?

There was talk in the python-dev mailing list recently
about creating a unified interface to the various
archiving modules. You might like to keep an eye on
what's happening there.

-- 
Greg

[toc] | [prev] | [next] | [standalone]


#86826

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2015-03-03 07:26 +0000
Message-ID<mailman.8.1425367581.21433.python-list@python.org>
In reply to#86799
On 03/03/2015 02:29, Terry Reedy wrote:
> On 3/2/2015 8:12 PM, Ben Finney wrote:
>> Seth P <seth-p@outlook.com> writes:
>>
>>> Is there a reason tarfile and zipfile don't use the same method/member
>>> names, where it makes sense?
>
> The situation is known to some core developers, but is hard to change now.
>
>> One likely explanation is that the modules's APIs were designed by
>> different people unaware of the work of the other.
>
> Plus tartfiles come from unix world, whereas zip was used instead in
> Windows world.
>
>

Is the tart bit the thing that you can eat, a loose woman or something 
else, such as a typo? :)

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#86835

FromGregory Ewing <greg.ewing@canterbury.ac.nz>
Date2015-03-03 23:39 +1300
Message-ID<cllha7Foe09U2@mid.individual.net>
In reply to#86826
Mark Lawrence wrote:
> On 03/03/2015 02:29, Terry Reedy wrote:
> 
>> Plus tartfiles come from unix world, whereas zip was used instead in
>> Windows world.
>>
> Is the tart bit the thing that you can eat, a loose woman or something 
> else, such as a typo? :)

Tartfiles would be what you get from xxx sites, no?

-- 
Greg

[toc] | [prev] | [next] | [standalone]


#86872

FromMarcos Almeida Azevedo <marcos.al.azevedo@gmail.com>
Date2015-03-04 09:12 +0800
Message-ID<mailman.28.1425431548.21433.python-list@python.org>
In reply to#86835

[Multipart message — attachments visible in raw view] — view raw

On Tue, Mar 3, 2015 at 6:39 PM, Gregory Ewing <greg.ewing@canterbury.ac.nz>
wrote:

> Mark Lawrence wrote:
>
>> On 03/03/2015 02:29, Terry Reedy wrote:
>>
>>  Plus tartfiles come from unix world, whereas zip was used instead in
>>> Windows world.
>>>
>>>  Is the tart bit the thing that you can eat, a loose woman or something
>> else, such as a typo? :)
>>
>
> Tartfiles would be what you get from xxx sites, no?
>

tartfiles is the compressed air that comes from behind and flies around
unwanted by the public


>
> --
> Greg
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
Marcos | I love PHP, Linux, and Java
<http://javadevnotes.com/java-long-to-string-examples>

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web