Created
November 5, 2013 23:54
-
-
Save elbuo8/7328497 to your computer and use it in GitHub Desktop.
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
tarname = os.getcwd() + '/' + data['name'] + '.tgz' | |
tar = tarfile.open(tarname, 'w:gz') | |
for filename in os.listdir(os.getcwd()): | |
tar.add(filename) | |
tar.close() | |
print tarname | |
files = {'file': open(tarfile, 'rb')} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment