Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'agree,': 0.07; 'behave': 0.07; 'exits': 0.07; 'modules.': 0.07; 'terry': 0.07; '(there': 0.09; '21,': 0.09; 'content-type:multipart/signed': 0.09; 'filename:fname piece:signature': 0.09; 'merged': 0.09; 'thu': 0.09; 'url:packages': 0.09; 'files.': 0.10; 'am,': 0.13; 'wrote:': 0.15; "api's": 0.16; 'cares': 0.16; 'content-type:application/pgp- signature': 0.16; 'different,': 0.16; 'differnet': 0.16; 'filename:fname piece:asc': 0.16; 'filename:fname:signature.asc': 0.16; 'hmm.': 0.16; 'partly': 0.16; 'rantingrick': 0.16; 'reedy': 0.16; 'richardson': 0.16; 'should.': 0.16; 'subject:between': 0.16; 'such.': 0.16; 'tarfile': 0.16; 'zipfile': 0.16; 'pm,': 0.16; '>>>': 0.16; 'received:internal': 0.19; 'ryan': 0.19; 'cheers,': 0.19; 'seems': 0.20; 'archives': 0.22; 'header:In- Reply-To:1': 0.22; 'least,': 0.23; 'received:10.202': 0.23; 'received:10.202.2': 0.23; 'received:66.111': 0.23; 'received:66.111.4': 0.23; 'received:messagingengine.com': 0.23; 'received:smtp.messagingengine.com': 0.23; 'interface': 0.23; "python's": 0.25; 'fri,': 0.28; 'objects': 0.28; 'do.': 0.30; '-0400': 0.30; 'kelly': 0.30; 'url:au': 0.31; 'entry': 0.33; 'anyone': 0.33; 'to:addr:python-list': 0.34; 'normally': 0.34; 'pretty': 0.35; 'file': 0.36; 'url:python': 0.37; 'comparing': 0.37; 'interface.': 0.37; 'but': 0.37; 'received:192': 0.38; 'url:org': 0.38; 'subject:: ': 0.38; 'header:Mime-Version:1': 0.39; 'either': 0.39; 'to:addr:python.org': 0.39; 'skip:z 10': 0.40; "i'd": 0.40; 'details': 0.65; 'visit': 0.68; 'hand,': 0.76; '12:48': 0.84; '2011:': 0.84; 'url:fs': 0.84 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=subject:from:to:in-reply-to:references :content-type:date:message-id:mime-version; s=smtpout; bh=qrgkVJ DbGD12PPKkZSUmxFdh3Qs=; b=pcG78D0nvDYCuSorc1GxREzyjCOBPMOkiS8FPH yjnSMIEf5MpKig9bzpFACn39rM+8Dd1xumWy5rDeUzkdyzmlP17ByXdmFSn/CHB/ wmuUXi32yR8ZgkwkkrUIZcWiinbrkI2hm4HcKDRt7BY6qYlpXJ2dLHwjsn3+k+ju 1w+dM= X-Sasl-enc: ehwfSGiH/0wzjz/qwNztSg3nIKXgA/DckYCM3chXRKwD 1311314188 Subject: Re: Inconsistencies between zipfile and tarfile APIs From: Ryan Kelly To: python-list@python.org In-Reply-To: References: <5fd8e664-c855-41a2-9d8b-36d4c486f0b9@n35g2000yqf.googlegroups.com> <3241cbe4-9829-438b-ac0e-a0b87aff62d9@q15g2000yqk.googlegroups.com> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-pgA0orohsjbGXE/6YWAX" Date: Fri, 22 Jul 2011 15:56:22 +1000 Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 65 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1311314191 news.xs4all.nl 23903 [2001:888:2000:d::a6]:36111 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:10074 --=-pgA0orohsjbGXE/6YWAX Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2011-07-22 at 01:45 -0400, Terry Reedy wrote: > On 7/22/2011 12:48 AM, rantingrick wrote: > > On Jul 21, 11:13 pm, Corey Richardson wrote: > >> Excerpts from rantingrick's message of Thu Jul 21 23:46:05 -0400 2011: > >> > >>> I may have found the mother of all inconsitency warts when comparing > >>> the zipfile and tarfile modules. Not only are the API's different, bu= t > >>> the entry and exits are differnet AND zipfile/tarfile do not behave > >>> like proper file objects should. > >> > >> I agree, actually. >=20 > Hmm. Archives are more like directories than files. Windows, at least,= =20 > seems to partly treat zipfiles as more or less as such. Certainly, 7zip= =20 > present a directory interface. So opening a zipfile/tarfile would be=20 > like opening a directory, which we normally do not do. On the other=20 > hand, I am not sure I like python's interface to directories that much. Indeed. Actually, I'd say that archives are more like *entire filesystems* than either files or directories. We have a pretty nice ZipFS implementation as part of the PyFilesystem project: http://packages.python.org/fs/ If anyone cares enough to whip up a TarFS implementation it would be gratefully merged into trunk. (There may even be the start of one in the bugtracker somewhere, I don't recall...) Cheers, Ryan --=20 Ryan Kelly http://www.rfk.id.au | This message is digitally signed. Please visit ryan@rfk.id.au | http://www.rfk.id.au/ramblings/gpg/ for details --=-pgA0orohsjbGXE/6YWAX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAk4pEQIACgkQfI5S64uP50qwrACfXAfL5t5qOlfqjMbhp453ce3a m10AoJv+veHdoy33/crFrSnFEhim7P4p =kqjq -----END PGP SIGNATURE----- --=-pgA0orohsjbGXE/6YWAX--