def store_results_dir(package_dirpath, results_dirpath):
 tgz_filepath = path.join(package_dirpath, RESULTS_DIR_TARBALL)
 tgz = tarfile.open(tgz_filepath, 'w:gz')
 results_dirname = path.basename(results_dirpath)
 tgz.add(results_dirpath, results_dirname)
 tgz.close()

def store_results_dir ( package_dirpath , results_dirpath ) : tgz_filepath = path . join ( package_dirpath , RESULTS_DIR_TARBALL ) tgz = tarfile . open ( tgz_filepath , 'w:gz' ) results_dirname = path . basename ( results_dirpath ) tgz . add ( results_dirpath , results_dirname ) tgz . close ( )
make tarball of results_dirpath in package_dirpath .