[issue6254] tarfile unnecessarily requires seekable files

2009-06-12 Thread Lars Gustäbel
Lars Gustäbel added the comment: It is no documentation bug either: tarfile.open() is prominently featured right on the top of the first page of the tarfile module online documentation. tarfile.Tarfile() follows right after it with a short notice that tarfile.open() should better be used instead

[issue6254] tarfile unnecessarily requires seekable files

2009-06-11 Thread Michael K Johnson
Michael K Johnson added the comment: OK, not intended for "everyday use"; I understand this as meaning that it is considered primarily an internal interface, and thus one that has an explicitly unstable API. It is hard for me to guess that this would be the case, since this intent is not docume

[issue6254] tarfile unnecessarily requires seekable files

2009-06-11 Thread Lars Gustäbel
Lars Gustäbel added the comment: tarfile.TarFile is neither unsupported nor deprecated. It is just too low-level for everyday use. -- ___ Python tracker ___ _

[issue6254] tarfile unnecessarily requires seekable files

2009-06-10 Thread Michael K Johnson
Michael K Johnson added the comment: We are doing output, and mode='w|' works. We were using tarfile.TarFile, not realizing that the default constructor was an unsupported and deprecated interface (!?!) -- status: open -> closed ___ Python tracker

[issue6254] tarfile unnecessarily requires seekable files

2009-06-10 Thread Lars Gustäbel
Lars Gustäbel added the comment: If I am not mistaken the functionality you look for is the streaming mode of tarfile.open(): tar = tarfile.open(fileobj=sys.stdin, mode="r|*") Does this solve your problem? -- assignee: -> lars.gustaebel nosy: +lars.gustaebel

[issue6254] tarfile unnecessarily requires seekable files

2009-06-10 Thread Michael K Johnson
New submission from Michael K Johnson : In python 2.6 (not 2.4, haven't checked 2.5), the __init__() method of the TarFile class calls the tell() method on the tar file, which doesn't work if you are reading from standard input or writing to standard output, two very reasonable things to do with