Created
November 7, 2013 07:21
-
-
Save yureative/7350443 to your computer and use it in GitHub Desktop.
parse email from stdin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def parse_email_from_stdin(): | |
| """標準入力からメールデータを受け取り、解析して | |
| Message オブジェクトにして返す | |
| """ | |
| parser = FeedParser() | |
| for line in sys.stdin: | |
| parser.feed(line) | |
| return parser.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment