Mercurial > hg > config
comparison python/quotemail.py @ 365:6bbc4867a795
begin porting from shell function
| author | Jeff Hammel <jhammel@mozilla.com> |
|---|---|
| date | Thu, 11 Jul 2013 17:01:42 -0700 |
| parents | |
| children | c78da6f7ca79 |
comparison
equal
deleted
inserted
replaced
| 364:2e33cd82af58 | 365:6bbc4867a795 |
|---|---|
| 1 #!/usr/bin/env python | |
| 2 | |
| 3 """ | |
| 4 quote as per email | |
| 5 """ | |
| 6 | |
| 7 def prefix(text, quote='> '): | |
| 8 return '\n'.join(['%s%s' % (quote, line.rstrip()) | |
| 9 for line in text.strip().splitlines()]) | |
| 10 | |
| 11 if __name__ == '__main__': | |
| 12 import sys | |
| 13 print prefix(sys.stdin.read()) |
