def listAllBuckets(): size = 0 bucketList = s3commands.doListAllBuckets() for bucket in bucketList: print bucket.name keyList = s3commands.doGetBucket(bucket.name) for key in keyList: print "", key.dump() size += key.size print "\nTotal Usage: %s" % human(size)
def listBucket(theBucket): keyList = s3commands.doGetBucket(theBucket) for key in keyList: print "", key.dump()