Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
|
Data Structures | |
class | _Database |
Functions | |
def | __setitem__ |
def | __delitem__ |
def | keys |
def | has_key |
def | __contains__ |
def | iterkeys |
def | __len__ |
def | close |
def | __del__ |
def | open |
Variables | |
_open = __builtin__.open | |
int | _BLOCKSIZE = 512 |
error = IOError | |
tuple | npos = ((pos + _BLOCKSIZE - 1) // _BLOCKSIZE) |
Does not work under MW compiler pos = ((pos + _BLOCKSIZE - 1) / _BLOCKSIZE) * _BLOCKSIZE f.seek(pos) More... | |
pos = npos | |
__iter__ = iterkeys | |
_index | |
_datfile | |
_dirfile | |
_bakfile | |
A dumb and slow but simple dbm clone. For database spam, spam.dir contains the index (a text file), spam.bak *may* contain a backup of the index (also a text file), while spam.dat contains the data (a binary file). XXX TO DO: - seems to contain a bug when updating... - reclaim free space (currently, space once occupied by deleted or expanded items is never reused) - support concurrent access (currently, if two processes take turns making updates, they can mess up the index) - support efficient access to large databases (currently, the whole index is read when the database is opened, and some updates rewrite the whole index) - support opening for read-only (flag = 'm')
def dumbdbm.__contains__ | ( | self, | |
key | |||
) |
Definition at line 135 of file dumbdbm.py.
def dumbdbm.__del__ | ( | self) |
Definition at line 150 of file dumbdbm.py.
def dumbdbm.__delitem__ | ( | self, | |
key | |||
) |
Definition at line 125 of file dumbdbm.py.
def dumbdbm.__len__ | ( | self) |
Definition at line 142 of file dumbdbm.py.
def dumbdbm.__setitem__ | ( | self, | |
key, | |||
val | |||
) |
Definition at line 108 of file dumbdbm.py.
def dumbdbm.close | ( | self) |
def dumbdbm.has_key | ( | self, | |
key | |||
) |
Definition at line 132 of file dumbdbm.py.
def dumbdbm.iterkeys | ( | self) |
Definition at line 138 of file dumbdbm.py.
def dumbdbm.keys | ( | self) |
Definition at line 129 of file dumbdbm.py.
def dumbdbm.open | ( | file, | |
flag = None , |
|||
mode = 0666 |
|||
) |
Definition at line 156 of file dumbdbm.py.
__iter__ = iterkeys |
Definition at line 140 of file dumbdbm.py.
_bakfile |
Definition at line 148 of file dumbdbm.py.
int _BLOCKSIZE = 512 |
Definition at line 29 of file dumbdbm.py.
_datfile |
Definition at line 148 of file dumbdbm.py.
_dirfile |
Definition at line 148 of file dumbdbm.py.
_index |
Definition at line 147 of file dumbdbm.py.
_open = __builtin__.open |
Definition at line 27 of file dumbdbm.py.
error = IOError |
Definition at line 31 of file dumbdbm.py.
tuple npos = ((pos + _BLOCKSIZE - 1) // _BLOCKSIZE) |
Does not work under MW compiler pos = ((pos + _BLOCKSIZE - 1) / _BLOCKSIZE) * _BLOCKSIZE f.seek(pos)
Definition at line 87 of file dumbdbm.py.
pos = npos |
Definition at line 89 of file dumbdbm.py.