2012-10-29 | Paul Boddie | raw annotate files changeset graph | Added message interpretation and parsing to the Message class. Changed the PostMessage action to use the Message class for the interpretation of messages. Changed the message test to use the Message class and added a test of message parsing using the class. Added a Mailbox class for reading and writing bundles of messages. |
1 #!/usr/bin/env python 2 3 from MoinMessage import Message 4 from email.mime.text import MIMEText 5 import sys 6 7 if __name__ == "__main__": 8 message = Message() 9 10 for arg in sys.argv[1:]: 11 message.add_update([MIMEText(arg, "moin")]) 12 13 text = message.get_payload() 14 print text 15 16 # vim: tabstop=4 expandtab shiftwidth=4