Back to index

python3.2  3.2.2
Functions
find-uname Namespace Reference

Functions

def main

Function Documentation

def find-uname.main (   args)

Definition at line 23 of file find-uname.py.

00023 
00024 def main(args):
00025     unicode_names = []
00026     for ix in range(sys.maxunicode+1):
00027         try:
00028             unicode_names.append((ix, unicodedata.name(chr(ix))))
00029         except ValueError: # no name for the character
00030             pass
00031     for arg in args:
00032         pat = re.compile(arg, re.I)
00033         matches = [(y,x) for (x,y) in unicode_names
00034                    if pat.search(y) is not None]
00035         if matches:
00036             print("***", arg, "matches", "***")
00037             for match in matches:
00038                 print("%s (%d)" % match)

Here is the call graph for this function: