if __name__ == '__main__':
if len (sys.argv) == 1 or ('--stdin' in sys.argv and len (sys.argv) != 2):
- print "Usage:\n %s [UNICODE_STRING]...\nor:\n %s --stdin" % (sys.argv[0], sys.argv[0])
+ print "Usage:\n %s UNICODE_STRING...\nor:\n %s --stdin" % (sys.argv[0], sys.argv[0])
sys.exit (1)
if '--stdin' in sys.argv:
def pretty_names (s):
- s = re.sub (r"[<+>\\]", "", s)
- s = re.sub (r"[uU]", " ", s)
+ s = re.sub (r"[<+>\\uU]", " ", s)
s = [unichr (int (x, 16)) for x in re.split ('[, \n]', s) if len (x)]
return ' + '.join (pretty_name (x) for x in s)
if __name__ == '__main__':
if len (sys.argv) == 1 or ('--stdin' in sys.argv and len (sys.argv) != 2):
- print "Usage:\n %s [UNICODE_CODEPOINTS]...\nor:\n %s --stdin" % (sys.argv[0], sys.argv[0])
+ print "Usage:\n %s UNICODE_CODEPOINTS...\nor:\n %s --stdin" % (sys.argv[0], sys.argv[0])
sys.exit (1)
if '--stdin' in sys.argv: