Mercurial > hg > config
annotate python/strip_unicode.py @ 929:7c4be71a560b default tip
remove old aliases
| author | Jeff Hammel <k0scist@gmail.com> |
|---|---|
| date | Mon, 20 Oct 2025 15:22:19 -0700 |
| parents | 6df7507e6338 |
| children |
| rev | line source |
|---|---|
| 885 | 1 #!/usr/bin/env python |
| 2 | |
| 3 import string | |
| 4 import sys | |
| 5 | |
| 6 | |
| 7 def main(args=sys.argv[1:]): | |
| 8 | |
| 9 if args: | |
| 10 message = ' '.join(args) | |
| 11 else: | |
| 12 message = sys.stdin.read() | |
| 13 | |
| 14 print(''.join(i for i in message if i in string.printable)) | |
| 15 | |
| 16 | |
| 17 if __name__ == '__main__': | |
| 18 main() |
