X7ROOT File Manager
Current Path:
/lib64/python2.7/Demo/scripts
lib64
/
python2.7
/
Demo
/
scripts
/
??
..
??
README
(1009 B)
??
beer.py
(458 B)
??
beer.pyc
(703 B)
??
beer.pyo
(703 B)
??
eqfix.py
(6.16 KB)
??
eqfix.pyc
(4.53 KB)
??
eqfix.pyo
(4.53 KB)
??
fact.py
(1.11 KB)
??
fact.pyc
(1.14 KB)
??
fact.pyo
(1.14 KB)
??
find-uname.py
(1.18 KB)
??
find-uname.pyc
(1.47 KB)
??
find-uname.pyo
(1.47 KB)
??
from.py
(873 B)
??
from.pyc
(751 B)
??
from.pyo
(751 B)
??
lpwatch.py
(2.77 KB)
??
lpwatch.pyc
(2.54 KB)
??
lpwatch.pyo
(2.54 KB)
??
makedir.py
(509 B)
??
makedir.pyc
(732 B)
??
makedir.pyo
(732 B)
??
markov.py
(3.5 KB)
??
markov.pyc
(3.93 KB)
??
markov.pyo
(3.93 KB)
??
mboxconvert.py
(3.11 KB)
??
mboxconvert.pyc
(3.18 KB)
??
mboxconvert.pyo
(3.18 KB)
??
morse.py
(4.21 KB)
??
morse.pyc
(4.33 KB)
??
morse.pyo
(4.33 KB)
??
pi.py
(887 B)
??
pi.pyc
(921 B)
??
pi.pyo
(921 B)
??
pp.py
(3.72 KB)
??
pp.pyc
(2.28 KB)
??
pp.pyo
(2.28 KB)
??
primes.py
(602 B)
??
primes.pyc
(921 B)
??
primes.pyo
(921 B)
??
queens.py
(2.19 KB)
??
queens.pyc
(2.95 KB)
??
queens.pyo
(2.95 KB)
??
script.py
(961 B)
??
script.pyc
(1.21 KB)
??
script.pyo
(1.21 KB)
??
unbirthday.py
(3.07 KB)
??
unbirthday.pyc
(2.93 KB)
??
unbirthday.pyo
(2.93 KB)
??
update.py
(2.68 KB)
??
update.pyc
(2.69 KB)
??
update.pyo
(2.69 KB)
Editing: find-uname.py
#! /usr/bin/python2.7 """ For each argument on the command line, look for it in the set of all Unicode names. Arguments are treated as case-insensitive regular expressions, e.g.: % find-uname 'small letter a$' 'horizontal line' *** small letter a$ matches *** LATIN SMALL LETTER A (97) COMBINING LATIN SMALL LETTER A (867) CYRILLIC SMALL LETTER A (1072) PARENTHESIZED LATIN SMALL LETTER A (9372) CIRCLED LATIN SMALL LETTER A (9424) FULLWIDTH LATIN SMALL LETTER A (65345) *** horizontal line matches *** HORIZONTAL LINE EXTENSION (9135) """ import unicodedata import sys import re def main(args): unicode_names = [] for ix in range(sys.maxunicode+1): try: 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 = [(y,x) for (x,y) in unicode_names if pat.search(y) is not None] if matches: print "***", arg, "matches", "***" for match in matches: print "%s (%d)" % match if __name__ == "__main__": main(sys.argv[1:])
Upload File
Create Folder