Output buffer for non-blocking reads on selectable files like pipes
and sockets. Init with a file descriptor for the file.
|
|
__init__(self,
fd,
maxChunkSize=1024)
Encapsulate file descriptor FD, with optional MAX_READ_CHUNK_SIZE
(default 1024). |
source code
|
|
|
|
|
|
|
peekPendingChar(self,
timeout=0)
Return, but don't consume, first character of unconsumed output from
file, or empty string if none. |
source code
|
|
|
|
readPendingChar(self)
Consume first character of unconsumed output from file, or empty
string if none. |
source code
|
|
|
|
readPendingChars(self,
max=None)
Consume uncomsumed output from FILE, or empty string if nothing
pending. |
source code
|
|
|
|
|
|
|
readline(self)
Return next output line from file, blocking until it is received. |
source code
|
|
|
|
read(self,
nchars)
Read nchars from input, blocking until they are available. |
source code
|
|