|
|
__init__(self,
f)
Create a new PushbackFile object to wrap a file-like object. |
|
|
|
|
write(self,
buf)
Write the specified buffer to the file. |
|
|
|
|
pushback(self,
s)
Push a character or string back onto the input stream. |
|
|
|
|
unread(self,
s)
Push a character or string back onto the input stream. |
|
|
|
|
read(self,
n=-1)
Read n bytes from the open file. |
|
|
|
str
|
readline(self,
length=-1)
Read the next line from the file. |
|
|
|
list
|
readlines(self,
sizehint=0)
Read all remaining lines in the file. |
|
|
|
|
|
|
str
|
next(self)
A file object is its own iterator. |
|
|
|
|
close(self)
Close the file. |
|
|
|
|
flush(self)
Force a flush. |
|
|
|
|
truncate(self,
size=-1)
Truncate the underlying file. |
|
|
|
int
|
tell(self)
Return the file's current position, if applicable. |
|
|
|
|
seek(self,
offset,
whence=os.SEEK_SET)
Set the file's current position. |
|
|
|
int
|
fileno(self)
Return the integer file descriptor used by the underlying file. |
|
|
|
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|