(tarball_fname, cwd=None)
expand a tarball
expand a tarball
expand a tarball
def expand_tarball(tarball_fname, cwd=None):
    "expand a tarball"
    if tarball_fname.endswith('.gz'):
        opts = 'xzf'
    elif tarball_fname.endswith('.bz2'):
        opts = 'xjf'
    else:
        opts = 'xf'
    args = ['/bin/tar', opts, tarball_fname]
    process_command(args, cwd=cwd)
def expand_tarball ( tarball_fname , cwd = None ) : if tarball_fname . endswith ( '.gz' ) : opts = 'xzf' elif tarball_fname . endswith ( '.bz2' ) : opts = 'xjf' else : opts = 'xf' args = [ '/bin/tar' , opts , tarball_fname ] process_command ( args , cwd = cwd )