On Thu, Feb 11, 2010 at 11:23 AM, Lao Mao wrote:
> Hello,
>
> I've written the below to get the previous day's logs from an Amazon S3
> bucket.
>
> #!/usr/bin/python
> import time
> from datetime import datetime
> import boto
>
> daily_s3_log = open("/tmp/s3logs", "w+")
> now = datetime.now()
> c
the date difference. Or, switch it around and test
the date first, the the "key.name.startswith("log/access_log")".
Sincerely,
Randy Raymond
From: Lao Mao
Sent: Thursday, February 11, 2010 10:23 AM
To: tutor@python.org
Subject: [Tutor] Downloading S3 Logs
Hello,
I've written the
Hello,
I've written the below to get the previous day's logs from an Amazon S3
bucket.
#!/usr/bin/python
import time
from datetime import datetime
import boto
daily_s3_log = open("/tmp/s3logs", "w+")
now = datetime.now()
connection = boto.connect_s3()
bucket = connection.get_bucket("downloads.se