Created
November 7, 2016 16:33
-
-
Save ampz9/9e1b4f0a3daaa396b70f013648b44ea9 to your computer and use it in GitHub Desktop.
creating tar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def make_tarfile(output_filename, source_dir): | |
with tarfile.open(output_filename, "w:gz") as tar: | |
tar.add(source_dir, arcname=os.path.basename(source_dir)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment