Package email :: Module feedparser :: Class BufferedSubFile
[hide private]
[frames] | no frames]

Class BufferedSubFile

object --+
         |
        BufferedSubFile

A file-ish object that can have new data loaded into it.

You can also push and pop line-matching predicates onto a stack. When the current predicate matches the current line, a false EOF response (i.e. empty string) is returned instead. This lets the parser adhere to a simple abstraction -- it parses until EOF closes the current message.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
push_eof_matcher(self, pred)
 
pop_eof_matcher(self)
 
close(self)
 
readline(self)
 
unreadline(self, line)
 
push(self, data)
Push some new data into this object.
 
pushlines(self, lines)
 
is_closed(self)
 
__iter__(self)
 
next(self)

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)