Mercurial > p > roundup > code
view roundup/anypy/email_.py @ 4496:e76576b52f2d
Norwegian Bokmal translation by Christian Aastorp
(with some fixes regarding leading and trailing newlines)
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Mon, 23 May 2011 09:52:46 +0000 |
| parents | 9d37875416c3 |
| children | c426cb251bc7 |
line wrap: on
line source
try: # Python 2.5+ from email.parser import FeedParser except ImportError: # Python 2.4 try : from email.Parser import FeedParser except ImportError: from email.Parser import Parser class FeedParser: def __init__(self): self.content = [] def feed(self, s): self.content.append(s) def close(self): p = Parser() return p.parsestr(''.join(self.content))
