bostonaholic
August 21st, 2009, 03:57 PM
I want the command line to scroll through the files as they're being extracted, as if I were doing a normal extraction from the CLI.
> tar xzvf <archive.tar.gz>
Extracting file1
Extracting file2
.
.
.
Here is what my python method looks like so far.
def extract (self, file, dir):
if not os.path.exists(dir):
os.mkdir(dir)
tar = tarfile.open(file, 'r:gz')
tar.extractall(dir)
tar.close()
Thanks.
> tar xzvf <archive.tar.gz>
Extracting file1
Extracting file2
.
.
.
Here is what my python method looks like so far.
def extract (self, file, dir):
if not os.path.exists(dir):
os.mkdir(dir)
tar = tarfile.open(file, 'r:gz')
tar.extractall(dir)
tar.close()
Thanks.