diff --git a/Lib/mailbox.py b/Lib/mailbox.py index 2d0254ea5a6..4c4eebe3321 100755 --- a/Lib/mailbox.py +++ b/Lib/mailbox.py @@ -134,6 +134,26 @@ def next(self): 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