A MultiFile instance has the following methods:
''
and set self.last
to 1 or 0 according as
the match is or is not an end-marker. If the line matches any other
stacked boundary, raise an error. On encountering end-of-file on the
underlying stream object, the method raises Error unless
all boundaries have been popped.
'-
-'
at
start of line (which all MIME boundaries have) but it is declared so
it can be overridden in derived classes.
Note that this test is used intended as a fast guard for the real boundary tests; if it always returns false it will merely slow processing, not cause it to fail.
It is possible to push more than one boundary. Encountering the most-recently-pushed boundary will return EOF; encountering any other boundary will raise an error.
'-
-'
(which MIME section boundaries have) but
it is declared so it can be overridden in derived classes. This
method need not append LF or CR-LF, as comparison with the result
ignores trailing whitespace.
'-
-'
and appends '-
-'
(like a
MIME-multipart end-of-message marker) but it is declared so it can be
be overridden in derived classes. This method need not append LF or
CR-LF, as comparison with the result ignores trailing whitespace.
Finally, MultiFile instances have two public instance variables:
See About this document... for information on suggesting changes.