diff options
author | Guido van Rossum <guido@python.org> | 1997-05-15 14:33:09 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-05-15 14:33:09 (GMT) |
commit | fdf58fe59a94b66ad9951bb64eedd90521ba72eb (patch) | |
tree | 5bc85ba7a5e2d2f73dd9b91eb16b51bceb806633 /Lib | |
parent | 71606f8dd950604620efb37b86e81ee03f9d232b (diff) | |
download | cpython-fdf58fe59a94b66ad9951bb64eedd90521ba72eb.zip cpython-fdf58fe59a94b66ad9951bb64eedd90521ba72eb.tar.gz cpython-fdf58fe59a94b66ad9951bb64eedd90521ba72eb.tar.bz2 |
Added BabylMailbox class by Fred Lundh (untested).
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/mailbox.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Lib/mailbox.py b/Lib/mailbox.py index 2d0254e..4c4eebe 100755 --- a/Lib/mailbox.py +++ b/Lib/mailbox.py @@ -134,6 +134,26 @@ class MHMailbox: return rfc822.Message(fp) +class BabylMailbox(_Mailbox): + def _search_start(self): + while 1: + line = self.fp.readline() + if not line: + raise EOFError + if line == '*** EOOH ***\n': + return + + def _search_end(self): + while 1: + pos = self.fp.tell() + line = self.fp.readline() + if not line: + return + if line == '\037\014\n': + self.fp.seek(pos) + return + + def _test(): import time import sys |