Minor
This commit is contained in:
parent
8f1db07894
commit
47ca766a9c
@ -8,7 +8,7 @@ def decode (s):
|
||||
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:
|
||||
|
@ -34,15 +34,14 @@ def pretty_name (x):
|
||||
|
||||
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user