def _zip_package(filename, path): with zipfile.ZipFile(filename, mode='w') as zfh: for filename in path.visit(): zfh.write(str(filename), filename.relto(path.dirname))
def _zip_directory(filename, path): with zipfile.ZipFile(filename, mode='w') as zfh: for filename in path.visit(fil='*.py*'): zfh.write(str(filename), filename.relto(path))