view python/quotemail.py @ 369:11cf7018ebff

new crappy package for helping me with http://k0s.org/portfolio/python/python-tools.txt
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 21 Jul 2013 05:27:28 -0700
parents 6bbc4867a795
children c78da6f7ca79
line wrap: on
line source

#!/usr/bin/env python

"""
quote as per email
"""

def prefix(text, quote='> '):
    return '\n'.join(['%s%s' % (quote, line.rstrip())
                      for line in text.strip().splitlines()])

if __name__ == '__main__':
    import sys
    print prefix(sys.stdin.read())