Created
September 11, 2013 20:23
-
-
Save toastdriven/6529278 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # The gif used for uploading below can be grabbed from https://dl.dropboxusercontent.com/u/114233/tally_ho.gif | |
| import boto | |
| conn = boto.connect_s3() | |
| try: | |
| bucket = conn.get_bucket('ssl_test') | |
| except: | |
| bucket = conn.create_bucket('ssl_test') | |
| for i in range(10): | |
| for key in bucket.list(): | |
| key.delete() | |
| key = bucket.new_key('tally_ho.gif') | |
| key.set_contents_from_filename('tally_ho.gif') | |
| k = bucket.get_key('tally_ho.gif') | |
| print len(k.get_contents_as_string()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment