2015-04-12 | Paul Boddie | raw annotate files changeset graph | Added replacement email modules to fix header damage and signature verification, generally fixed in Python 3 but not backported to Python 2. See Python bugs #1349106 and #1571841. | gpgutils |
1 #!/usr/bin/env python 2 3 from email import message_from_string 4 from MoinMessage import timestamp 5 import sys 6 7 if __name__ == "__main__": 8 text = sys.stdin.read() 9 10 message = message_from_string(text) 11 timestamp(message) 12 13 # Show the resulting message text. 14 15 text = message.as_string() 16 print text 17 18 # vim: tabstop=4 expandtab shiftwidth=4