/usr/lib/python2.6/site-packages/boto
NameSizeModeActions
beanstalk/-0755rm
cacerts/-0755rm
cloudformation/-0755rm
cloudfront/-0755rm
cloudsearch/-0755rm
cloudsearch2/-0755rm
cloudtrail/-0755rm
cognito/-0755rm
contrib/-0755rm
datapipeline/-0755rm
directconnect/-0755rm
dynamodb/-0755rm
dynamodb2/-0755rm
ec2/-0755rm
ecs/-0755rm
elasticache/-0755rm
elastictranscoder/-0755rm
emr/-0755rm
file/-0755rm
fps/-0755rm
glacier/-0755rm
gs/-0755rm
iam/-0755rm
kinesis/-0755rm
logs/-0755rm
manage/-0755rm
mashups/-0755rm
mturk/-0755rm
mws/-0755rm
opsworks/-0755rm
pyami/-0755rm
rds/-0755rm
rds2/-0755rm
redshift/-0755rm
roboto/-0755rm
route53/-0755rm
s3/-0755rm
sdb/-0755rm
services/-0755rm
ses/-0755rm
sns/-0755rm
sqs/-0755rm
sts/-0755rm
support/-0755rm
swf/-0755rm
vendored/-0755rm
vpc/-0755rm
auth.py398540644editdlrm
auth.pyc348910644editdlrm
auth.pyo348910644editdlrm
auth_handler.py20640644editdlrm
auth_handler.pyc17350644editdlrm
auth_handler.pyo17350644editdlrm
compat.py26390644editdlrm
compat.pyc15210644editdlrm
compat.pyo15210644editdlrm
connection.py507910644editdlrm
connection.pyc384300644editdlrm
connection.pyo384300644editdlrm
endpoints.json183840644editdlrm
exception.py171060644editdlrm
exception.pyc226280644editdlrm
exception.pyo226280644editdlrm
handler.py23820644editdlrm
handler.pyc23790644editdlrm
handler.pyo23790644editdlrm
https_connection.py51350644editdlrm
https_connection.pyc50880644editdlrm
https_connection.pyo50880644editdlrm
jsonresponse.py60320644editdlrm
jsonresponse.pyc57330644editdlrm
jsonresponse.pyo57330644editdlrm
plugin.py27110644editdlrm
plugin.pyc23270644editdlrm
plugin.pyo23270644editdlrm
provider.py208900644editdlrm
provider.pyc136860644editdlrm
provider.pyo136860644editdlrm
regioninfo.py62140644editdlrm
regioninfo.pyc56060644editdlrm
regioninfo.pyo56060644editdlrm
requestlog.py14860644editdlrm
requestlog.pyc21850644editdlrm
requestlog.pyo21850644editdlrm
resultset.py65560644editdlrm
resultset.pyc57690644editdlrm
resultset.pyo57690644editdlrm
storage_uri.py391150644editdlrm
storage_uri.pyc352790644editdlrm
storage_uri.pyo352790644editdlrm
utils.py348850644editdlrm
utils.pyc346950644editdlrm
utils.pyo346950644editdlrm
__init__.py363370644editdlrm
__init__.pyc334460644editdlrm
__init__.pyo334460644editdlrm
Edit: /usr/lib/python2.6/site-packages/boto/resultset.py (6556B)
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # tribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to the fol- # lowing conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. from boto.s3.user import User class ResultSet(list): """ The ResultSet is used to pass results back from the Amazon services to the client. It is light wrapper around Python's :py:class:`list` class, with some additional methods for parsing XML results from AWS. Because I don't really want any dependencies on external libraries, I'm using the standard SAX parser that comes with Python. The good news is that it's quite fast and efficient but it makes some things rather difficult. You can pass in, as the marker_elem parameter, a list of tuples. Each tuple contains a string as the first element which represents the XML element that the resultset needs to be on the lookout for and a Python class as the second element of the tuple. Each time the specified element is found in the XML, a new instance of the class will be created and popped onto the stack. :ivar str next_token: A hash used to assist in paging through very long result sets. In most cases, passing this value to certain methods will give you another 'page' of results. """ def __init__(self, marker_elem=None): list.__init__(self) if isinstance(marker_elem, list): self.markers = marker_elem else: self.markers = [] self.marker = None self.key_marker = None self.next_marker = None # avail when delimiter used self.next_key_marker = None self.next_upload_id_marker = None self.next_version_id_marker = None self.next_generation_marker = None self.version_id_marker = None self.is_truncated = False self.next_token = None self.status = True def startElement(self, name, attrs, connection): for t in self.markers: if name == t[0]: obj = t[1](connection) self.append(obj) return obj if name == 'Owner': # Makes owner available for get_service and # perhaps other lists where not handled by # another element. self.owner = User() return self.owner return None def to_boolean(self, value, true_value='true'): if value == true_value: return True else: return False def endElement(self, name, value, connection): if name == 'IsTruncated': self.is_truncated = self.to_boolean(value) elif name == 'Marker': self.marker = value elif name == 'KeyMarker': self.key_marker = value elif name == 'NextMarker': self.next_marker = value elif name == 'NextKeyMarker': self.next_key_marker = value elif name == 'VersionIdMarker': self.version_id_marker = value elif name == 'NextVersionIdMarker': self.next_version_id_marker = value elif name == 'NextGenerationMarker': self.next_generation_marker = value elif name == 'UploadIdMarker': self.upload_id_marker = value elif name == 'NextUploadIdMarker': self.next_upload_id_marker = value elif name == 'Bucket': self.bucket = value elif name == 'MaxUploads': self.max_uploads = int(value) elif name == 'MaxItems': self.max_items = int(value) elif name == 'Prefix': self.prefix = value elif name == 'return': self.status = self.to_boolean(value) elif name == 'StatusCode': self.status = self.to_boolean(value, 'Success') elif name == 'ItemName': self.append(value) elif name == 'NextToken': self.next_token = value elif name == 'nextToken': self.next_token = value # Code exists which expects nextToken to be available, so we # set it here to remain backwards-compatibile. self.nextToken = value elif name == 'BoxUsage': try: connection.box_usage += float(value) except: pass elif name == 'IsValid': self.status = self.to_boolean(value, 'True') else: setattr(self, name, value) class BooleanResult(object): def __init__(self, marker_elem=None): self.status = True self.request_id = None self.box_usage = None def __repr__(self): if self.status: return 'True' else: return 'False' def __nonzero__(self): return self.status def startElement(self, name, attrs, connection): return None def to_boolean(self, value, true_value='true'): if value == true_value: return True else: return False def endElement(self, name, value, connection): if name == 'return': self.status = self.to_boolean(value) elif name == 'StatusCode': self.status = self.to_boolean(value, 'Success') elif name == 'IsValid': self.status = self.to_boolean(value, 'True') elif name == 'RequestId': self.request_id = value elif name == 'requestId': self.request_id = value elif name == 'BoxUsage': self.request_id = value else: setattr(self, name, value)