Anyone know how to read tar files from a pipe in #Python? I'm getting this error when using
tarfile.open(path, mode="r|")
: File "lib/python3.12/tarfile.py", line 690, in read
self.fileobj.seek(offset + (self.position - start))
File "lib/python3.12/tarfile.py", line 522, in seek
raise StreamError("seeking backwards is not allowed")
tarfile.StreamError: seeking backwards is not allowed
like this
reshared this
Ryan Frame
in reply to Neil E. Hodges • • •https://stackoverflow.com/a/25333193
python tarfile writes tar to pipe
Stack OverflowNeil E. Hodges
in reply to Neil E. Hodges • •intar.extractfile(info.name)
withintar.extractfile(info)
. 👍reshared this
David Zaslavsky 🗳️ ☑️ and Canageek reshared this.