Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ffc87d5c
Commit
ffc87d5c
authored
Oct 10, 2009
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Style fixes.
parent
a0bcc27e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Demo/scripts/find-uname.py
Demo/scripts/find-uname.py
+6
-6
No files found.
Demo/scripts/find-uname.py
View file @
ffc87d5c
...
...
@@ -21,20 +21,20 @@ import sys
import
re
def
main
(
args
):
unicode_names
=
[]
unicode_names
=
[]
for
ix
in
range
(
sys
.
maxunicode
+
1
):
try
:
unicode_names
.
append
(
(
ix
,
unicodedata
.
name
(
unichr
(
ix
)))
)
unicode_names
.
append
(
(
ix
,
unicodedata
.
name
(
unichr
(
ix
)))
)
except
ValueError
:
# no name for the character
pass
for
arg
in
args
:
pat
=
re
.
compile
(
arg
,
re
.
I
)
matches
=
[(
x
,
y
)
for
(
x
,
y
)
in
unicode_names
matches
=
[(
y
,
x
)
for
(
x
,
y
)
in
unicode_names
if
pat
.
search
(
y
)
is
not
None
]
if
matches
:
print
"***"
,
arg
,
"matches"
,
"***"
for
(
x
,
y
)
in
matches
:
print
"%s (%d)"
%
(
y
,
x
)
for
match
in
matches
:
print
"%s (%d)"
%
match
if
__name__
==
"__main__"
:
main
(
sys
.
argv
[
1
:])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment