Skip to content

Commit

Permalink
feat:change print format
Browse files Browse the repository at this point in the history
  • Loading branch information
liuf5 committed Mar 25, 2021
1 parent 78882b8 commit 894d88c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions zoomeye/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ def convert_str(s):
d = {
'\n': '\\n',
'\r': '\\r',
'\t': '\\t'
'\t': '\\t',
'\b': '\\b',
'\a': '\\a',
}
for c in s:
if ord(c) > 0xff or ord(c) in range(32, 127):
res.append(c)
elif c in d.keys():
if c in d.keys():
res.append(d[c])
else:
res.append('\\x%.2x' % ord(c))
res.append(c)
return ''.join(res)


Expand Down

0 comments on commit 894d88c

Please sign in to comment.