/usr/lib/python2.6/site-packages
NameSizeModeActions
appdirs-1.4.0.dist-info/-0755rm
argparse-1.4.0.dist-info/-0755rm
babel/-0755rm
Babel-2.1.1.dist-info/-0755rm
Babel-2.3.4.dist-info/-0755rm
backports/-0755rm
backports.ssl_match_hostname-3.4.0.2-py2.6.egg-info/-0755rm
boto/-0755rm
boto-2.34.0-py2.6.egg-info/-0755rm
cffi-1.6.0-py2.6-linux-x86_64.egg/-0755rm
chardet/-0755rm
chardet-2.2.1-py2.6.egg-info/-0755rm
cinderclient/-0755rm
clcommon/-0755rm
cliff/-0755rm
cliff-1.15.0.dist-info/-0755rm
cliff-2.0.0.dist-info/-0755rm
clifftablib/-0755rm
cliff_tablib-1.1-py2.6.egg-info/-0755rm
cloudinit/-0755rm
cloud_init-0.7.5-py2.6.egg-info/-0755rm
cmd2-0.6.8-py2.6.egg-info/-0755rm
concurrent/-0755rm
cryptography-1.3.1-py2.6-linux-x86_64.egg/-0755rm
dateutil/-0755rm
dbus/-0755rm
debtcollector/-0755rm
debtcollector-0.8.0.dist-info/-0755rm
debtcollector-1.3.0.dist-info/-0755rm
decorator-4.0.9.dist-info/-0755rm
dict-0.0.5-py2.6.egg-info/-0755rm
distribute-0.6.10-py2.6.egg-info/-0755rm
dns/-0755rm
enum/-0755rm
enum34-1.0.4-py2.6.egg-info/-0755rm
enum34-1.1.3-py2.6.egg/-0755rm
funcsigs/-0755rm
funcsigs-1.0.2.dist-info/-0755rm
futures-3.0.3.dist-info/-0755rm
futures-3.0.5.dist-info/-0755rm
get-0.0.7-py2.6.egg-info/-0755rm
glanceclient/-0755rm
idna/-0755rm
idna-2.0.dist-info/-0755rm
idna-2.1-py2.6.egg/-0755rm
iniparse/-0755rm
iotop/-0755rm
iotop-0.3.2-py2.6.egg-info/-0755rm
ipaddress-1.0.14-py2.6.egg-info/-0755rm
ipaddress-1.0.16-py2.6.egg/-0755rm
iso8601/-0755rm
iso8601-0.1.10-py2.6.egg-info/-0755rm
iso8601-0.1.11.dist-info/-0755rm
jsonpatch-1.2-py2.6.egg-info/-0755rm
jsonpatch-1.11.dist-info/-0755rm
jsonpatch-1.13.dist-info/-0755rm
jsonpointer-1.9.dist-info/-0755rm
jsonpointer-1.10.dist-info/-0755rm
jsonschema/-0755rm
jsonschema-2.5.1.dist-info/-0755rm
keystoneauth1/-0755rm
keystoneauth1-1.1.0.dist-info/-0755rm
keystoneauth1-2.6.0.dist-info/-0755rm
keystoneclient/-0755rm
markdown/-0755rm
monotonic-0.4-py2.6.egg-info/-0755rm
monotonic-1.1.dist-info/-0755rm
ndg/-0755rm
ndg_httpsclient-0.4.0-py2.6.egg-info/-0755rm
netaddr/-0755rm
netaddr-0.7.18.dist-info/-0755rm
neutronclient/-0755rm
nose/-0755rm
nose-0.10.4-py2.6.egg-info/-0755rm
novaclient/-0755rm
oauth/-0755rm
oauth-1.0.1-py2.6.egg-info/-0755rm
openstack/-0755rm
openstackclient/-0755rm
openstacksdk-0.8.5.dist-info/-0755rm
oslo.config-2.4.0.dist-info/-0755rm
oslo.config-3.9.0.dist-info/-0755rm
oslo.i18n-2.6.0.dist-info/-0755rm
oslo.i18n-3.6.0.dist-info/-0755rm
oslo.serialization-1.9.0.dist-info/-0755rm
oslo.serialization-2.4.0.dist-info/-0755rm
oslo.utils-2.5.0.dist-info/-0755rm
oslo.utils-3.8.0.dist-info/-0755rm
oslo_config/-0755rm
oslo_i18n/-0755rm
oslo_serialization/-0755rm
oslo_utils/-0755rm
os_client_config/-0755rm
os_client_config-1.8.1.dist-info/-0755rm
os_client_config-1.17.0.dist-info/-0755rm
pbr/-0755rm
pbr-1.8.0.dist-info/-0755rm
pbr-1.9.1.dist-info/-0755rm
pip-7.1.2-py2.6.egg/-0755rm
pip-8.1.1-py2.6.egg/-0755rm
pkg_resources/-0755rm
positional/-0755rm
positional-1.1.0-py2.6.egg-info/-0755rm
post-0.0.5-py2.6.egg-info/-0755rm
prettytable-0.7.2-py2.6.egg-info/-0755rm
public-0.0.0-py2.6.egg-info/-0755rm
pyasn1/-0755rm
pyasn1-0.0.12a-py2.6.egg-info/-0755rm
pyasn1-0.1.9-py2.6.egg/-0755rm
pyasn1-0.1.9.dist-info/-0755rm
pycparser/-0755rm
pycparser-2.14-py2.6.egg/-0755rm
pycparser-2.14-py2.6.egg-info/-0755rm
pygments/-0755rm
Pygments-1.1.1-py2.6.egg-info/-0755rm
pyparsing-2.0.3.dist-info/-0755rm
pyparsing-2.1.1.dist-info/-0755rm
python_cinderclient-1.4.0.dist-info/-0755rm
python_cinderclient-1.6.0.dist-info/-0755rm
python_dateutil-1.4.1-py2.6.egg-info/-0755rm
python_glanceclient-1.1.0.dist-info/-0755rm
python_glanceclient-2.0.0.dist-info/-0755rm
python_keystoneclient-1.7.1.dist-info/-0755rm
python_keystoneclient-2.3.1.dist-info/-0755rm
python_neutronclient-3.1.0.dist-info/-0755rm
python_novaclient-2.31.0.dist-info/-0755rm
python_novaclient-4.0.0.dist-info/-0755rm
python_openstackclient-1.7.1.dist-info/-0755rm
python_openstackclient-2.4.0.dist-info/-0755rm
python_swiftclient-2.6.0.dist-info/-0755rm
python_swiftclient-3.0.0.dist-info/-0755rm
pytz/-0755rm
pytz-2015.6.dist-info/-0755rm
pytz-2016.4.dist-info/-0755rm
pyzor-1.0.0-py2.6.egg/-0755rm
query_string-0.0.5-py2.6.egg-info/-0755rm
repoze/-0755rm
repoze.lru-0.6-py2.6.egg-info/-0755rm
request-0.0.5-py2.6.egg-info/-0755rm
requests/-0755rm
requests-2.7.0.dist-info/-0755rm
requests-2.9.1.dist-info/-0755rm
requestsexceptions/-0755rm
requestsexceptions-1.1.3.dist-info/-0755rm
rhn/-0755rm
rpmUtils/-0755rm
rsa/-0755rm
rsa-3.4.2-py2.6.egg-info/-0755rm
self-0.0.5-py2.6.egg-info/-0755rm
setools/-0755rm
setuptools/-0755rm
setuptools-20.10.1.dist-info/-0755rm
six-1.9.0.dist-info/-0755rm
six-1.10.0.dist-info/-0755rm
sos/-0755rm
stevedore/-0755rm
stevedore-1.8.0.dist-info/-0755rm
stevedore-1.12.0.dist-info/-0755rm
supervisor/-0755rm
swiftclient/-0755rm
tablib/-0755rm
tablib-0.10.0.dist-info/-0755rm
unicodecsv/-0755rm
unicodecsv-0.14.1-py2.6.egg-info/-0755rm
urlgrabber/-0755rm
urllib3/-0755rm
urllib3-1.10.2-py2.6.egg-info/-0755rm
urllib3-1.12.dist-info/-0755rm
urllib3-1.15.1.dist-info/-0755rm
warlock/-0755rm
warlock-1.1.0-py2.6.egg-info/-0755rm
warlock-1.2.0-py2.6.egg-info/-0755rm
yum/-0755rm
yumutils/-0755rm
appdirs.py223740755editdlrm
appdirs.pyc206650644editdlrm
argparse.py892140644editdlrm
argparse.pyc668150644editdlrm
argparse.pyo664910644editdlrm
chardet-2.0.1-py2.6.egg-info16050644editdlrm
clsudo.py129530644editdlrm
clsudo.pyc113920644editdlrm
clsudo.pyo113920644editdlrm
cmd2.py650690644editdlrm
cmd2.pyc650190644editdlrm
configobj-4.6.0-py2.6.egg-info3120644editdlrm
configobj.py864470644editdlrm
configobj.pyc664120644editdlrm
configobj.pyo664120644editdlrm
dbus_bindings.py330644editdlrm
dbus_bindings.pyc1850644editdlrm
dbus_bindings.pyo1850644editdlrm
decorator.py157750644editdlrm
decorator.pyc144850644editdlrm
dict.py22390644editdlrm
dnspython-1.11.1-py2.6.egg-info12800644editdlrm
easy-install.pth2760644editdlrm
easy_install.py1260644editdlrm
easy_install.pyc3170644editdlrm
easy_install.pyo3170644editdlrm
get.py3220644editdlrm
hwdata.py81420644editdlrm
hwdata.pyc62830644editdlrm
hwdata.pyo62830644editdlrm
iniparse-0.3.1-py2.6.egg-info10850644editdlrm
ipaddress.py796590644editdlrm
ipaddress.pyc759000644editdlrm
jsonpatch.py159460644editdlrm
jsonpatch.pyc174810644editdlrm
jsonpatch.pyo172770644editdlrm
jsonpointer-1.0-py2.6.egg-info3020644editdlrm
jsonpointer.py66100644editdlrm
jsonpointer.pyc63680644editdlrm
jsonpointer.pyo63680644editdlrm
libproxy.py43300644editdlrm
libproxy.pyc39900644editdlrm
libproxy.pyo39900644editdlrm
lprettytable.py238490755editdlrm
lprettytable.pyc196190644editdlrm
lprettytable.pyo194720644editdlrm
Markdown-2.0.1-py2.6.egg-info13400644editdlrm
monotonic.py53450644editdlrm
monotonic.pyc54790644editdlrm
ndg_httpsclient-0.4.0-py2.6-nspkg.pth2960644editdlrm
ordereddict-1.1-py2.6.egg-info1830644editdlrm
ordereddict-1.2-py2.6.egg-info1830644editdlrm
ordereddict.py42210644editdlrm
ordereddict.pyc44210644editdlrm
ordereddict.pyo44210644editdlrm
pciutils-2.3.5-py2.6.egg-info2420644editdlrm
pkg_resources.py881960644editdlrm
pkg_resources.pyc928750644editdlrm
pkg_resources.pyo928750644editdlrm
post.py2260644editdlrm
prettytable.py542040644editdlrm
prettytable.pyc522520644editdlrm
prettytable.pyo512660644editdlrm
public.py46350644editdlrm
pyOpenSSL-0.15.1-py2.6.egg2357360644editdlrm
pyOpenSSL-16.0.0-py2.6.egg943080644editdlrm
pyparsing.py1582560644editdlrm
pyparsing.pyc1578590644editdlrm
pytz-2010h-py2.6.egg-info225770644editdlrm
query_string.py8400644editdlrm
README1190644editdlrm
repoze.lru-0.6-py2.6-nspkg.pth3070644editdlrm
request.py2070644editdlrm
requests-2.6.0-py2.6.egg-info403570644editdlrm
rhnlib-2.5.22-py2.6.egg-info3390644editdlrm
secureio.py92220644editdlrm
secureio.pyc47210644editdlrm
secureio.pyo47210644editdlrm
self.py7280644editdlrm
setuptools-0.6c11-py2.6.egg-info1440644editdlrm
setuptools-18.3.2-py2.6.egg3590330755editdlrm
setuptools-20.9.0-py2.6.egg4728320644editdlrm
setuptools.pth340644editdlrm
site.py23620644editdlrm
site.pyc17710644editdlrm
site.pyo17710644editdlrm
six.py296640644editdlrm
six.pyc293300644editdlrm
six.pyo269110644editdlrm
supervisor-2.1-py2.6.egg-info7970644editdlrm
urlgrabber-3.9.1-py2.6.egg-info22850644editdlrm
validate.py467680644editdlrm
validate.pyc473840644editdlrm
validate.pyo473840644editdlrm
Edit: /usr/lib/python2.6/site-packages/jsonpointer.py (6610B)
# -*- coding: utf-8 -*- # # python-json-pointer - An implementation of the JSON Pointer syntax # https://github.com/stefankoegl/python-json-pointer # # Copyright (c) 2011 Stefan Kögl # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. The name of the author may not be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # """ Identify specific nodes in a JSON document (RFC 6901) """ # Will be parsed by setup.py to determine package metadata __author__ = 'Stefan Kögl ' __version__ = '1.0' __website__ = 'https://github.com/stefankoegl/python-json-pointer' __license__ = 'Modified BSD License' try: from urllib import unquote from itertools import izip except ImportError: # Python 3 from urllib.parse import unquote izip = zip from itertools import tee import re # array indices must not contain leading zeros, signs, spaces, decimals, etc RE_ARRAY_INDEX=re.compile('0|[1-9][0-9]*$') class JsonPointerException(Exception): pass class EndOfList(object): """ Result of accessing element "-" of a list """ def __init__(self, list_): self.list_ = list_ def __repr__(self): return '{cls}({lst})'.format(cls=self.__class__.__name__, lst=repr(self.list_)) _nothing = object() def resolve_pointer(doc, pointer, default=_nothing): """ Resolves pointer against doc and returns the referenced object >>> obj = {"foo": {"anArray": [ {"prop": 44}], "another prop": {"baz": "A string" }}} >>> resolve_pointer(obj, '') == obj True >>> resolve_pointer(obj, '/foo') == obj['foo'] True >>> resolve_pointer(obj, '/foo/another%20prop') == obj['foo']['another prop'] True >>> resolve_pointer(obj, '/foo/another%20prop/baz') == obj['foo']['another prop']['baz'] True >>> resolve_pointer(obj, '/foo/anArray/0') == obj['foo']['anArray'][0] True >>> resolve_pointer(obj, '/some/path', None) == None True """ pointer = JsonPointer(pointer) return pointer.resolve(doc, default) class JsonPointer(object): """ A JSON Pointer that can reference parts of an JSON document """ def __init__(self, pointer): parts = pointer.split('/') if parts.pop(0) != '': raise JsonPointerException('location must starts with /') parts = map(unquote, parts) parts = [part.replace('~1', '/') for part in parts] parts = [part.replace('~0', '~') for part in parts] self.parts = parts def to_last(self, doc, default=_nothing): """ Resolves ptr until the last step, returns (sub-doc, last-step) """ if not self.parts: return doc, None for part in self.parts[:-1]: doc = self.walk(doc, part) return doc, self.get_part(doc, self.parts[-1]) def resolve(self, doc, default=_nothing): """Resolves the pointer against doc and returns the referenced object""" for part in self.parts: try: doc = self.walk(doc, part) except JsonPointerException: if default is _nothing: raise else: return default return doc get = resolve def get_part(self, doc, part): """ Returns the next step in the correct type """ if isinstance(doc, dict): return part elif isinstance(doc, list): if part == '-': return part if not RE_ARRAY_INDEX.match(str(part)): raise JsonPointerException("'%s' is not a valid list index" % (part, )) return int(part) else: raise JsonPointerException("Unknown document type '%s'" % (doc.__class__,)) def walk(self, doc, part): """ Walks one step in doc and returns the referenced part """ part = self.get_part(doc, part) if isinstance(doc, dict): try: return doc[part] except KeyError: raise JsonPointerException("member '%s' not found in %s" % (part, doc)) elif isinstance(doc, list): if part == '-': return EndOfList(doc) try: return doc[part] except IndexError: raise JsonPointerException("index '%s' is out of bounds" % (part, )) else: raise JsonPointerException("can not go beyond '%s' (type '%s')" % (part, doc.__class__)) def contains(self, ptr): """" Returns True if self contains the given ptr """ return len(self.parts) > len(ptr.parts) and \ self.parts[:len(ptr.parts)] == ptr.parts def __eq__(self, other): """ compares a pointer to another object Pointers can be compared by comparing their strings (or splitted strings), because no two different parts can point to the same structure in an object (eg no different number representations) """ if not isinstance(other, JsonPointer): return False return self.parts == other.parts def __hash__(self): return hash(tuple(self.parts)) def pairwise(iterable): "s -> (s0,s1), (s1,s2), (s2, s3), ..." a, b = tee(iterable) for _ in b: break return izip(a, b)