Re: using tarfile with an open file object

2005-05-04 Thread Peter Hansen
Matthew Thorley wrote: > I've been using tarfile like this > > import tarfile > tar = tarfile.open('path_to_tar_archive', 'r:gz') > > > But I need to use it like this: > > archive = open('path_to_tar_archive', 'r') > tar = tarfile.open(archive.readlines()) > > or something similar. In essence

using tarfile with an open file object

2005-05-04 Thread Matthew Thorley
I've been using tarfile like this import tarfile tar = tarfile.open('path_to_tar_archive', 'r:gz') But I need to use it like this: archive = open('path_to_tar_archive', 'r') tar = tarfile.open(archive.readlines()) or something similar. In essence I need to use tarfile to manipulate an already