Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Demo/scripts/find-uname.py

    r2 r391  
    2222
    2323def main(args):
    24     unicode_names= []
     24    unicode_names = []
    2525    for ix in range(sys.maxunicode+1):
    2626        try:
    27             unicode_names.append( (ix, unicodedata.name(unichr(ix))) )
     27            unicode_names.append((ix, unicodedata.name(unichr(ix))))
    2828        except ValueError: # no name for the character
    2929            pass
    3030    for arg in args:
    3131        pat = re.compile(arg, re.I)
    32         matches = [(x,y) for (x,y) in unicode_names
    33                        if pat.search(y) is not None]
     32        matches = [(y,x) for (x,y) in unicode_names
     33                   if pat.search(y) is not None]
    3434        if matches:
    3535            print "***", arg, "matches", "***"
    36             for (x,y) in matches:
    37                 print "%s (%d)" % (y,x)
     36            for match in matches:
     37                print "%s (%d)" % match
    3838
    3939if __name__ == "__main__":
Note: See TracChangeset for help on using the changeset viewer.