/usr/lib/python2.7/dist-packages/paste/webkit/wksession.py is in python-pastewebkit 1.0-8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | """
The WebKit session object; an interface surrounding a persistent
dictionary.
"""
from wkcommon import NoDefault
class Session:
def __init__(self, dict):
self._values = dict
def invalidate(self):
self._values.clear()
def value(self, name, default=NoDefault):
if default is NoDefault:
return self._values[name]
else:
return self._values.get(name, default)
def hasValue(self, name):
return self._values.has_key(name)
def setValue(self, name, value):
self._values[name] = value
def delValue(self, name):
del self._values[name]
def values(self):
return self._values
def setTimeout(self, timeout):
# @@: This should really do something
pass
def __getitem__(self, name):
return self.value(name)
def __setitem__(self, name, value):
self.setValue(name, value)
def __delitem__(self, name):
self.delValue(name)
|