Mercurial > repo
comparison bin/loudly @ 6490:6eacacd165b3
<oerjan> ` sed -i \'2s/itertools/itertools, locale/\' bin/loudly
author | HackBot |
---|---|
date | Sun, 03 Jan 2016 00:38:49 +0000 |
parents | e112f5e79a7a |
children | 14ff5d127fdf |
comparison
equal
deleted
inserted
replaced
6489:e112f5e79a7a | 6490:6eacacd165b3 |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 import sys, itertools | 2 import sys, itertools, locale |
3 inp = len(sys.argv) >= 2 and sys.argv[1] or raw_input() | 3 inp = len(sys.argv) >= 2 and sys.argv[1] or raw_input() |
4 cyc = itertools.cycle(["\00304,09","\00309,04"]) | 4 cyc = itertools.cycle(["\00304,09","\00309,04"]) |
5 print "".join(cyc.next() + c for c in unicode(inp, locale.nl_langinfo(locale.CODESET))).encode(locale.nl_langinfo(locale.CODESET)) | 5 print "".join(cyc.next() + c for c in unicode(inp, locale.nl_langinfo(locale.CODESET))).encode(locale.nl_langinfo(locale.CODESET)) |