| Home | Trees | Index | Help |
|
|---|
| Package corebio :: Package utils :: Class FileIndex |
|
object --+
|
FileIndex
Raf
Line based random access to a file. Quickly turn a file into a read-only
database.
Attr:
- indexfile -- The file to be indexed. Can be set to None and latter
replaced with a new file handle, for exampel, if you need to
close and latter reopen the file.
Bugs:
User must set the indexedfile to None before pickling this class.
| Method Summary | |
|---|---|
Args: - indexedfile -- The file to index - linekey -- An optional function. | |
__contains__(self,
item)
| |
__getitem__(self,
item)
| |
__iter__(self)
| |
__len__(self)
| |
Seek the indexfile to the position of item. | |
tell(self,
item)
| |
| Inherited from object | |
x.__delattr__('name') <==> del x.name... | |
x.__getattribute__('name') <==> x.name... | |
x.__hash__() <==> hash(x)... | |
T.__new__(S, ...) -> a new object with type S, a subtype of T... | |
helper for pickle... | |
helper for pickle... | |
x.__repr__() <==> repr(x)... | |
x.__setattr__('name', value) <==> x.name = value... | |
x.__str__() <==> str(x)... | |
| Class Variable Summary | |
|---|---|
list |
__slots__ = ['indexedfile', '_parser', '_positions', '_k...
|
member_descriptor |
indexedfile = <member 'indexedfile' of 'FileIndex' objec...
|
| Method Details |
|---|
__init__(self,
indexedfile,
linekey=None,
parser=None)
|
seek(self, item)Seek the indexfile to the position of item. |
| Class Variable Details |
|---|
__slots__
|
indexedfile
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on | http://epydoc.sf.net |