Mercurial > repo
changeset 6487:9ae470a31c52
<oerjan> ` sed -i \'s/itertools/itertools, locale/\' bin/loudly
author | HackBot |
---|---|
date | Sun, 03 Jan 2016 00:35:47 +0000 |
parents | c407448cbf0f |
children | 5f592a885f04 |
files | bin/loudly |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/loudly Sun Jan 03 00:35:14 2016 +0000 +++ b/bin/loudly Sun Jan 03 00:35:47 2016 +0000 @@ -1,5 +1,5 @@ #!/usr/bin/env python -import sys, itertools +import sys, itertools, locale inp = len(sys.argv) >= 2 and sys.argv[1] or raw_input() -cyc = itertools.cycle(["\00304,09","\00309,04"]) +cyc = itertools, locale.cycle(["\00304,09","\00309,04"]) print "".join(cyc.next() + c for c in unicode(inp, locale.nl_langinfo(locale.CODESET))).encode(locale.nl_langinfo(locale.CODESET))