2013-07-21 | Paul Boddie | raw annotate files changeset graph | Switched to using the communicate method for more reliable communication. |
1 #!/usr/bin/env python 2 3 from MoinMessage import GPG 4 from email.parser import Parser 5 import sys 6 7 if __name__ == "__main__": 8 message = Parser().parse(sys.stdin) 9 declaration, content = message.get_payload() 10 11 gpg = GPG() 12 text = gpg.decryptMessage(content.get_payload()) 13 14 # Show the resulting message text. 15 16 print text 17 18 # vim: tabstop=4 expandtab shiftwidth=4