Trees | Index | Help |
---|
Package Bio :: Package EUtils :: Module ReseekFile :: Class ReseekFile |
|
wrap a file handle to allow seeks back to the beginning
Takes a file handle in the constructor.
See the module docstring for more documentation.Method Summary | |
---|---|
__init__(self,
file)
| |
tell the ReseekFile to stop using the buffer once it's exhausted | |
read up to 'size' bytes from the file | |
read a line from the file | |
read all remaining lines from the file | |
offset, whence = 0 | |
the current position of the file | |
_check_no_buffer(self)
| |
_read(self,
size)
|
Method Details |
---|
nobuffer(self)tell the ReseekFile to stop using the buffer once it's exhausted |
read(self, size=-1)read up to 'size' bytes from the file Default is -1, which means to read to end of file. |
readline(self)read a line from the file |
readlines(self)read all remaining lines from the file |
seek(self, offset, whence=0)offset, whence = 0 Seek to a given byte position. Only supports whence == 0 and offset == the initial value of ReseekFile.tell() (which is usually 0, but not always.) |
tell(self)the current position of the file The initial position may not be 0 if the underlying input file supports tell and it not at position 0. |
Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Thu Mar 31 20:15:46 2005 | http://epydoc.sf.net |