(tarball_fname, directory, cwd=None)
create a tarball from a directory
create a tarball from a directory
create a tarball from a directory
def make_tarball(tarball_fname, directory, cwd=None):
    "create a tarball from a directory"
    if tarball_fname.endswith('.gz'):
        opts = 'czf'
    else:
        opts = 'cf'
    args = ['/bin/tar', opts, tarball_fname, directory]
    process_command(args, cwd=cwd)
def make_tarball ( tarball_fname , directory , cwd = None ) : if tarball_fname . endswith ( '.gz' ) : opts = 'czf' else : opts = 'cf' args = [ '/bin/tar' , opts , tarball_fname , directory ] process_command ( args , cwd = cwd )