This repository was archived by the owner on May 29, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ referred to as Boto).
5
5
6
6
## Requirements
7
7
8
- This sample project depends on boto , the AWS SDK for Python. You can install it
9
- with :
8
+ This sample project depends on Boto , the AWS SDK for Python, and requires
9
+ Python 2.6 or 2.7. You can install Boto using pip :
10
10
11
11
pip install boto
12
12
Original file line number Diff line number Diff line change 20
20
s3 = boto .connect_s3 ()
21
21
22
22
# Create a new bucket.
23
- bucket_name = "python-sdk-sample-" + str ( uuid .uuid4 () )
23
+ bucket_name = "python-sdk-sample-%s" % uuid .uuid4 ()
24
24
print "Creating new bucket with name: " + bucket_name
25
25
bucket = s3 .create_bucket (bucket_name )
26
26
33
33
k .set_contents_from_string ('This is a test of S3. Hello World!' )
34
34
35
35
# Fetch the key to show that we stored something.
36
- print "Downloading the object we just uploaded:\n "
37
- print k .get_contents_as_string () + "\n "
36
+ print "Downloading the object we just uploaded:"
37
+ print
38
+ print k .get_contents_as_string ()
39
+ print
38
40
39
41
print "Now delete the same object"
40
42
k .delete ()
You can’t perform that action at this time.
0 commit comments