Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #102831
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Random832 <random832@fastmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: tarfile : read from a socket? |
| Date | Thu, 11 Feb 2016 16:23:52 -0500 |
| Lines | 23 |
| Message-ID | <mailman.59.1455225841.22075.python-list@python.org> (permalink) |
| References | <n9hgtb$rls$1@news2.informatik.uni-stuttgart.de> <mailman.43.1455187713.22075.python-list@python.org> <n9i07l$vgl$1@news2.informatik.uni-stuttgart.de> <n9i246$vva$1@news2.informatik.uni-stuttgart.de> <n9idk7$37f$1@news2.informatik.uni-stuttgart.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de aspNsf88Cfm6e4Eu1wh1/weGGHWQ/ZxrmrcJxqIVufdg== |
| Return-Path | <random832@fastmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'error:': 0.05; 'none:': 0.05; '"%s"\'': 0.09; 'backwards': 0.09; 'received:internal': 0.09; 'thu,': 0.15; 'message-id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'true:': 0.16; 'wrote:': 0.16; 'skip:" 30': 0.20; 'feb': 0.23; 'this:': 0.23; 'header:In-Reply-To:1': 0.24; 'raise': 0.29; 'subject: : ': 0.30; 'stream': 0.33; 'file': 0.34; 'to:addr :python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'received:66': 0.38; 'subject:from': 0.39; 'to:addr:python.org': 0.40; 'header:Message-Id:1': 0.61; 'subject:read': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=rFIJDlgkzTT6B3Ex6orNggRafuE=; b=XxYtIc eg+S4tapJWlrDvZLaar3M7sjfKmyRIVjo9Zc5RDLyv2kC+FrfPKNUekzW35yVv16 iCv6FPku8Pg3G9Wpxsrol7s8hPbn/efa/brjHkwc1LFFR6PmNx3jSySfGscRmire RsLXlPG/fLXVhHyyjt+lbkXBw1tet7EZ5NWAk= |
| DKIM-Signature | v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=rFIJDlgkzTT6B3E x6orNggRafuE=; b=sMolGrFC+NhimBjfZnQTejohwbASoDXZmORJPPomWPaVs5m lrZnko1Hug9EQMUAMc1mt+ypslbyv+nnPaVO202FUzNjy7E3buv2g4gN0CRGqDPv vZnRrxBQYBXOqWBtXnUpsjTdI0nIaeRjON9cTGZg6gZ6s8+VEFY1CdGrT7Dg= |
| X-Sasl-Enc | 6Lq44pSPex9V8G2td6ao50s2oNP5XBoUPO+XlgVtnz2W 1455225832 |
| X-Mailer | MessagingEngine.com Webmail Interface - ajax-e69f0414 |
| In-Reply-To | <n9idk7$37f$1@news2.informatik.uni-stuttgart.de> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.21rc2 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:102831 |
Show key headers only | View raw
On Thu, Feb 11, 2016, at 11:41, Ulli Horlacher wrote:
> When I use:
>
> for member in taro.getmembers():
> print('extracting "%s"' % member.name)
> taro.extract(member)
>
> I get the error:
>
> File "/usr/lib/python2.7/tarfile.py", line 556, in seek
> raise StreamError("seeking backwards is not allowed")
>
> Of course, a stream is not seekable.
>
> Any ideas?
Try this:
while True:
member = taro.next()
if member is None: break
print('extracting "%s"' % member.name)
taro.extract(member)
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
tarfile : read from a socket? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2016-02-11 08:31 +0000
Re: tarfile : read from a socket? INADA Naoki <songofacandy@gmail.com> - 2016-02-11 19:26 +0900
Re: tarfile : read from a socket? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-02-11 11:47 +0100
Re: tarfile : read from a socket? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2016-02-11 12:53 +0000
Re: tarfile : read from a socket? MRAB <python@mrabarnett.plus.com> - 2016-02-11 13:16 +0000
Re: tarfile : read from a socket? Chris Angelico <rosuav@gmail.com> - 2016-02-12 00:18 +1100
Re: tarfile : read from a socket? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2016-02-11 13:34 +0000
Re: tarfile : read from a socket? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2016-02-11 13:25 +0000
Re: tarfile : read from a socket? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2016-02-11 16:41 +0000
Re: tarfile : read from a socket? MRAB <python@mrabarnett.plus.com> - 2016-02-11 17:10 +0000
modifying a standard module? (was: Re: tarfile : read from a socket?) Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2016-02-11 17:10 +0000
Re: modifying a standard module? (was: Re: tarfile : read from a socket?) Matt Wheeler <m@funkyhat.org> - 2016-02-12 20:53 +0000
Re: modifying a standard module? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2016-02-12 22:46 +0000
Re: modifying a standard module? Paul Rubin <no.email@nospam.invalid> - 2016-02-12 16:21 -0800
Re: tarfile : read from a socket? Peter Otten <__peter__@web.de> - 2016-02-11 18:18 +0100
Re: tarfile : read from a socket? Lars Gustäbel <lars@gustaebel.de> - 2016-02-11 18:27 +0100
Re: tarfile : read from a socket? Random832 <random832@fastmail.com> - 2016-02-11 16:23 -0500
Re: tarfile : read from a socket? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-02-12 09:35 +0100
Re: tarfile : read from a socket? Lars Gustäbel <lars@gustaebel.de> - 2016-02-12 09:40 +0100
Re: tarfile : read from a socket? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2016-02-12 12:48 +0000
csiph-web