Stream buffer for file-like objects.
Allow seeks on socket-like objects. Enables non-seekable file-like
objects some flexibility as regards to seeking. It does this via a
buffer, a StringIO object. Note, because it is assumed that a socket
stream is being manipulated, once the buffer "window" has
passed over a data segment, seeking prior to that is not allowed. XXX:
probably reinventing the wheel.
|
|
|
|
|
|
|
_read(self,
size)
A buffered read --- refactored. |
source code
|
|
|
|
|
readline(self)
Return one line of text: a string ending in a ' ' or EOF. |
source code
|
|
|
readlines(self)
Read entire file into memory! And return a list of lines of text. |
source code
|
|
|
_refactorBufIO(self,
writeFlushYN=0)
Keep the buffer window within __{MAX,ABS_MAX}_BUF_SIZE before the
current self._bufIO.tell() position. |
source code
|
|
|
|
|
|
|
writelines(self,
l)
Given list, concatenate and write. |
source code
|
|
|
|
|
tell(self)
Return current position in the file-like object. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|