Hackfut Security File Manager
Current Path:
/usr/lib/python2.6/site-packages/boto/s3
usr
/
lib
/
python2.6
/
site-packages
/
boto
/
s3
/
📁
..
📄
__init__.py
(2.29 KB)
📄
__init__.pyc
(1.76 KB)
📄
__init__.pyo
(1.76 KB)
📄
acl.py
(5.59 KB)
📄
acl.pyc
(5.95 KB)
📄
acl.pyo
(5.95 KB)
📄
bucket.py
(77.51 KB)
📄
bucket.pyc
(69.08 KB)
📄
bucket.pyo
(69.03 KB)
📄
bucketlistresultset.py
(6.64 KB)
📄
bucketlistresultset.pyc
(5.61 KB)
📄
bucketlistresultset.pyo
(5.61 KB)
📄
bucketlogging.py
(3.11 KB)
📄
bucketlogging.pyc
(2.84 KB)
📄
bucketlogging.pyo
(2.84 KB)
📄
connection.py
(25.58 KB)
📄
connection.pyc
(23.19 KB)
📄
connection.pyo
(23.05 KB)
📄
cors.py
(8.73 KB)
📄
cors.pyc
(7.83 KB)
📄
cors.pyo
(7.83 KB)
📄
deletemarker.py
(2.04 KB)
📄
deletemarker.pyc
(1.47 KB)
📄
deletemarker.pyo
(1.47 KB)
📄
key.py
(80.39 KB)
📄
key.pyc
(64.48 KB)
📄
key.pyo
(64.48 KB)
📄
keyfile.py
(4.32 KB)
📄
keyfile.pyc
(4.89 KB)
📄
keyfile.pyo
(4.89 KB)
📄
lifecycle.py
(8.06 KB)
📄
lifecycle.pyc
(9.02 KB)
📄
lifecycle.pyo
(9.02 KB)
📄
multidelete.py
(4.65 KB)
📄
multidelete.pyc
(4.86 KB)
📄
multidelete.pyo
(4.86 KB)
📄
multipart.py
(11.77 KB)
📄
multipart.pyc
(11.68 KB)
📄
multipart.pyo
(11.68 KB)
📄
prefix.py
(1.62 KB)
📄
prefix.pyc
(1.21 KB)
📄
prefix.pyo
(1.21 KB)
📄
resumable_download_handler.py
(15.23 KB)
📄
resumable_download_handler.pyc
(10.09 KB)
📄
resumable_download_handler.pyo
(10.09 KB)
📄
tagging.py
(1.69 KB)
📄
tagging.pyc
(3.6 KB)
📄
tagging.pyo
(3.6 KB)
📄
user.py
(1.92 KB)
📄
user.pyc
(1.48 KB)
📄
user.pyo
(1.48 KB)
📄
website.py
(10.36 KB)
📄
website.pyc
(12.02 KB)
📄
website.pyo
(12.02 KB)
Editing: tagging.py
from boto import handler import xml.sax class Tag(object): def __init__(self, key=None, value=None): self.key = key self.value = value def startElement(self, name, attrs, connection): return None def endElement(self, name, value, connection): if name == 'Key': self.key = value elif name == 'Value': self.value = value def to_xml(self): return '<Tag><Key>%s</Key><Value>%s</Value></Tag>' % ( self.key, self.value) def __eq__(self, other): return (self.key == other.key and self.value == other.value) class TagSet(list): def startElement(self, name, attrs, connection): if name == 'Tag': tag = Tag() self.append(tag) return tag return None def endElement(self, name, value, connection): setattr(self, name, value) def add_tag(self, key, value): tag = Tag(key, value) self.append(tag) def to_xml(self): xml = '<TagSet>' for tag in self: xml += tag.to_xml() xml += '</TagSet>' return xml class Tags(list): """A container for the tags associated with a bucket.""" def startElement(self, name, attrs, connection): if name == 'TagSet': tag_set = TagSet() self.append(tag_set) return tag_set return None def endElement(self, name, value, connection): setattr(self, name, value) def to_xml(self): xml = '<Tagging>' for tag_set in self: xml += tag_set.to_xml() xml +='</Tagging>' return xml def add_tag_set(self, tag_set): self.append(tag_set)
Upload File
Create Folder