Mercurial > hg > config
view python/strip_unicode.py @ 905:d6cce2e5cca6
update for modern Ubuntu 22.04
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Wed, 10 Apr 2024 08:47:01 -0700 |
parents | 6df7507e6338 |
children |
line wrap: on
line source
#!/usr/bin/env python import string import sys def main(args=sys.argv[1:]): if args: message = ' '.join(args) else: message = sys.stdin.read() print(''.join(i for i in message if i in string.printable)) if __name__ == '__main__': main()