Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
All Data Structures Namespaces Files Functions Variables
BsdDbShelf Class Reference
Inheritance diagram for BsdDbShelf:
Shelf

Public Member Functions

def __init__
 
def set_location
 
def next
 
def previous
 
def first
 
def last
 
- Public Member Functions inherited from Shelf
def __init__
 
def keys
 
def __len__
 
def has_key
 
def get
 
def __getitem__
 
def __setitem__
 
def __delitem__
 
def close
 
def __del__
 
def sync
 

Additional Inherited Members

- Data Fields inherited from Shelf
 dict
 

Detailed Description

Shelf implementation using the "BSD" db interface.

This adds methods first(), next(), previous(), last() and
set_location() that have no counterpart in [g]dbm databases.

The actual database must be opened using one of the "bsddb"
modules "open" routines (i.e. bsddb.hashopen, bsddb.btopen or
bsddb.rnopen) and passed to the constructor.

See the module's __doc__ string for an overview of the interface.

Definition at line 97 of file shelve.py.

Constructor & Destructor Documentation

def __init__ (   self,
  dict 
)

Definition at line 110 of file shelve.py.

111  def __init__(self, dict):
112  Shelf.__init__(self, dict)

Member Function Documentation

def first (   self)

Definition at line 128 of file shelve.py.

References pickle.load().

129  def first(self):
130  (key, value) = self.dict.first()
131  f = StringIO(value)
132  return (key, Unpickler(f).load())
def last (   self)

Definition at line 133 of file shelve.py.

References pickle.load().

134  def last(self):
135  (key, value) = self.dict.last()
136  f = StringIO(value)
137  return (key, Unpickler(f).load())
138 
def next (   self)

Definition at line 118 of file shelve.py.

References pickle.load().

119  def next(self):
120  (key, value) = self.dict.next()
121  f = StringIO(value)
122  return (key, Unpickler(f).load())
def previous (   self)

Definition at line 123 of file shelve.py.

References pickle.load().

124  def previous(self):
125  (key, value) = self.dict.previous()
126  f = StringIO(value)
127  return (key, Unpickler(f).load())
def set_location (   self,
  key 
)

Definition at line 113 of file shelve.py.

References pickle.load().

114  def set_location(self, key):
115  (key, value) = self.dict.set_location(key)
116  f = StringIO(value)
117  return (key, Unpickler(f).load())

The documentation for this class was generated from the following file: