/
usr
/
lib64
/
python2.7
/
Tools
/
scripts
/
/usr/lib64/python2.7/Tools/scripts
mkdir
upload
Name
Size
Mode
Actions
analyze_dxp.py
4205
0755
edit
dl
rm
analyze_dxp.pyc
4748
0644
edit
dl
rm
analyze_dxp.pyo
4748
0644
edit
dl
rm
byext.py
3944
0755
edit
dl
rm
byext.pyc
4521
0644
edit
dl
rm
byext.pyo
4521
0644
edit
dl
rm
byteyears.py
1637
0755
edit
dl
rm
byteyears.pyc
1398
0644
edit
dl
rm
byteyears.pyo
1398
0644
edit
dl
rm
checkappend.py
4657
0755
edit
dl
rm
checkappend.pyc
4886
0644
edit
dl
rm
checkappend.pyo
4886
0644
edit
dl
rm
checkpip.py
757
0755
edit
dl
rm
checkpip.pyc
1044
0644
edit
dl
rm
checkpip.pyo
1044
0644
edit
dl
rm
checkpyc.py
2010
0755
edit
dl
rm
checkpyc.pyc
1976
0644
edit
dl
rm
checkpyc.pyo
1976
0644
edit
dl
rm
classfix.py
5952
0755
edit
dl
rm
classfix.pyc
4189
0644
edit
dl
rm
classfix.pyo
4189
0644
edit
dl
rm
cleanfuture.py
8577
0755
edit
dl
rm
cleanfuture.pyc
7394
0644
edit
dl
rm
cleanfuture.pyo
7361
0644
edit
dl
rm
combinerefs.py
4380
0755
edit
dl
rm
combinerefs.pyc
4256
0644
edit
dl
rm
combinerefs.pyo
4223
0644
edit
dl
rm
copytime.py
663
0755
edit
dl
rm
copytime.pyc
937
0644
edit
dl
rm
copytime.pyo
937
0644
edit
dl
rm
crlf.py
610
0755
edit
dl
rm
crlf.pyc
855
0644
edit
dl
rm
crlf.pyo
855
0644
edit
dl
rm
cvsfiles.py
1786
0755
edit
dl
rm
cvsfiles.pyc
2163
0644
edit
dl
rm
cvsfiles.pyo
2163
0644
edit
dl
rm
db2pickle.py
3570
0755
edit
dl
rm
db2pickle.pyc
3497
0644
edit
dl
rm
db2pickle.pyo
3497
0644
edit
dl
rm
diff.py
2066
0755
edit
dl
rm
diff.pyc
2386
0644
edit
dl
rm
diff.pyo
2386
0644
edit
dl
rm
dutree.py
1615
0755
edit
dl
rm
dutree.pyc
2230
0644
edit
dl
rm
dutree.pyo
2230
0644
edit
dl
rm
eptags.py
1483
0755
edit
dl
rm
eptags.pyc
1876
0644
edit
dl
rm
eptags.pyo
1876
0644
edit
dl
rm
finddiv.py
2517
0755
edit
dl
rm
finddiv.pyc
3296
0644
edit
dl
rm
finddiv.pyo
3296
0644
edit
dl
rm
findlinksto.py
1069
0755
edit
dl
rm
findlinksto.pyc
1425
0644
edit
dl
rm
findlinksto.pyo
1425
0644
edit
dl
rm
findnocoding.py
2808
0755
edit
dl
rm
findnocoding.pyc
3201
0644
edit
dl
rm
findnocoding.pyo
3201
0644
edit
dl
rm
find_recursionlimit.py
3473
0755
edit
dl
rm
find_recursionlimit.pyc
5673
0644
edit
dl
rm
find_recursionlimit.pyo
5673
0644
edit
dl
rm
fixcid.py
9995
0755
edit
dl
rm
fixcid.pyc
7851
0644
edit
dl
rm
fixcid.pyo
7851
0644
edit
dl
rm
fixdiv.py
13841
0755
edit
dl
rm
fixdiv.pyc
13849
0644
edit
dl
rm
fixdiv.pyo
13766
0644
edit
dl
rm
fixheader.py
1189
0755
edit
dl
rm
fixheader.pyc
1471
0644
edit
dl
rm
fixheader.pyo
1471
0644
edit
dl
rm
fixnotice.py
3051
0755
edit
dl
rm
fixnotice.pyc
3500
0644
edit
dl
rm
fixnotice.pyo
3500
0644
edit
dl
rm
fixps.py
893
0755
edit
dl
rm
fixps.pyc
969
0644
edit
dl
rm
fixps.pyo
969
0644
edit
dl
rm
google.py
519
0755
edit
dl
rm
google.pyc
792
0644
edit
dl
rm
google.pyo
792
0644
edit
dl
rm
gprof2html.py
2167
0755
edit
dl
rm
gprof2html.pyc
2277
0644
edit
dl
rm
gprof2html.pyo
2277
0644
edit
dl
rm
h2py.py
5953
0755
edit
dl
rm
h2py.pyc
4392
0644
edit
dl
rm
h2py.pyo
4392
0644
edit
dl
rm
hotshotmain.py
1483
0755
edit
dl
rm
hotshotmain.pyc
1863
0644
edit
dl
rm
hotshotmain.pyo
1863
0644
edit
dl
rm
ifdef.py
3718
0755
edit
dl
rm
ifdef.pyc
2265
0644
edit
dl
rm
ifdef.pyo
2265
0644
edit
dl
rm
lfcr.py
618
0755
edit
dl
rm
lfcr.pyc
880
0644
edit
dl
rm
lfcr.pyo
880
0644
edit
dl
rm
linktree.py
2424
0755
edit
dl
rm
linktree.pyc
2025
0644
edit
dl
rm
linktree.pyo
2025
0644
edit
dl
rm
lll.py
742
0755
edit
dl
rm
lll.pyc
942
0644
edit
dl
rm
lll.pyo
942
0644
edit
dl
rm
logmerge.py
5575
0755
edit
dl
rm
logmerge.pyc
5083
0644
edit
dl
rm
logmerge.pyo
5083
0644
edit
dl
rm
mailerdaemon.py
7942
0755
edit
dl
rm
mailerdaemon.pyc
7364
0644
edit
dl
rm
mailerdaemon.pyo
7364
0644
edit
dl
rm
md5sum.py
2385
0755
edit
dl
rm
md5sum.pyc
2917
0644
edit
dl
rm
md5sum.pyo
2917
0644
edit
dl
rm
methfix.py
5462
0755
edit
dl
rm
methfix.pyc
4125
0644
edit
dl
rm
methfix.pyo
4125
0644
edit
dl
rm
mkreal.py
1627
0755
edit
dl
rm
mkreal.pyc
1980
0644
edit
dl
rm
mkreal.pyo
1980
0644
edit
dl
rm
ndiff.py
3808
0755
edit
dl
rm
ndiff.pyc
3859
0644
edit
dl
rm
ndiff.pyo
3859
0644
edit
dl
rm
nm2def.py
2443
0755
edit
dl
rm
nm2def.pyc
2960
0644
edit
dl
rm
nm2def.pyo
2960
0644
edit
dl
rm
objgraph.py
6017
0755
edit
dl
rm
objgraph.pyc
4933
0644
edit
dl
rm
objgraph.pyo
4933
0644
edit
dl
rm
parseentities.py
1719
0755
edit
dl
rm
parseentities.pyc
2077
0644
edit
dl
rm
parseentities.pyo
2077
0644
edit
dl
rm
patchcheck.py
7679
0755
edit
dl
rm
patchcheck.pyc
9128
0644
edit
dl
rm
patchcheck.pyo
9128
0644
edit
dl
rm
pathfix.py
4329
0755
edit
dl
rm
pathfix.pyc
3838
0644
edit
dl
rm
pathfix.pyo
3838
0644
edit
dl
rm
pdeps.py
3936
0755
edit
dl
rm
pdeps.pyc
3220
0644
edit
dl
rm
pdeps.pyo
3220
0644
edit
dl
rm
pickle2db.py
3942
0755
edit
dl
rm
pickle2db.pyc
3819
0644
edit
dl
rm
pickle2db.pyo
3819
0644
edit
dl
rm
pindent.py
17170
0755
edit
dl
rm
pindent.pyc
11559
0644
edit
dl
rm
pindent.pyo
11559
0644
edit
dl
rm
ptags.py
1224
0755
edit
dl
rm
ptags.pyc
1407
0644
edit
dl
rm
ptags.pyo
1407
0644
edit
dl
rm
pysource.py
3846
0755
edit
dl
rm
pysource.pyc
4009
0644
edit
dl
rm
pysource.pyo
4009
0644
edit
dl
rm
redemo.py
5792
0755
edit
dl
rm
redemo.pyc
5249
0644
edit
dl
rm
redemo.pyo
5249
0644
edit
dl
rm
reindent-rst.py
278
0755
edit
dl
rm
reindent-rst.pyc
481
0644
edit
dl
rm
reindent-rst.pyo
481
0644
edit
dl
rm
reindent.py
11417
0755
edit
dl
rm
reindent.pyc
9629
0644
edit
dl
rm
reindent.pyo
9590
0644
edit
dl
rm
rgrep.py
1492
0755
edit
dl
rm
rgrep.pyc
1881
0644
edit
dl
rm
rgrep.pyo
1881
0644
edit
dl
rm
serve.py
1147
0755
edit
dl
rm
serve.pyc
1597
0644
edit
dl
rm
serve.pyo
1597
0644
edit
dl
rm
setup.py
421
0644
edit
dl
rm
setup.pyc
548
0644
edit
dl
rm
setup.pyo
548
0644
edit
dl
rm
suff.py
621
0755
edit
dl
rm
suff.pyc
904
0644
edit
dl
rm
suff.pyo
904
0644
edit
dl
rm
svneol.py
2930
0755
edit
dl
rm
svneol.pyc
2904
0644
edit
dl
rm
svneol.pyo
2825
0644
edit
dl
rm
texcheck.py
9256
0644
edit
dl
rm
texcheck.pyc
8376
0644
edit
dl
rm
texcheck.pyo
8376
0644
edit
dl
rm
texi2html.py
69825
0755
edit
dl
rm
texi2html.pyc
83323
0644
edit
dl
rm
texi2html.pyo
83323
0644
edit
dl
rm
treesync.py
5783
0755
edit
dl
rm
treesync.pyc
5990
0644
edit
dl
rm
treesync.pyo
5990
0644
edit
dl
rm
untabify.py
1215
0755
edit
dl
rm
untabify.pyc
1583
0644
edit
dl
rm
untabify.pyo
1583
0644
edit
dl
rm
which.py
1630
0755
edit
dl
rm
which.pyc
1632
0644
edit
dl
rm
which.pyo
1632
0644
edit
dl
rm
win_add2path.py
1620
0644
edit
dl
rm
win_add2path.pyc
2069
0644
edit
dl
rm
win_add2path.pyo
2069
0644
edit
dl
rm
xxci.py
2797
0755
edit
dl
rm
xxci.pyc
4017
0644
edit
dl
rm
xxci.pyo
4017
0644
edit
dl
rm
Edit:
/usr/lib64/python2.7/Tools/scripts/ndiff.py
(3808B)
#! /usr/bin/python2.7 # Module ndiff version 1.7.0 # Released to the public domain 08-Dec-2000, # by Tim Peters (tim.one@home.com). # Provided as-is; use at your own risk; no warranty; no promises; enjoy! # ndiff.py is now simply a front-end to the difflib.ndiff() function. # Originally, it contained the difflib.SequenceMatcher class as well. # This completes the raiding of reusable code from this formerly # self-contained script. """ndiff [-q] file1 file2 or ndiff (-r1 | -r2) < ndiff_output > file1_or_file2 Print a human-friendly file difference report to stdout. Both inter- and intra-line differences are noted. In the second form, recreate file1 (-r1) or file2 (-r2) on stdout, from an ndiff report on stdin. In the first form, if -q ("quiet") is not specified, the first two lines of output are -: file1 +: file2 Each remaining line begins with a two-letter code: "- " line unique to file1 "+ " line unique to file2 " " line common to both files "? " line not present in either input file Lines beginning with "? " attempt to guide the eye to intraline differences, and were not present in either input file. These lines can be confusing if the source files contain tab characters. The first file can be recovered by retaining only lines that begin with " " or "- ", and deleting those 2-character prefixes; use ndiff with -r1. The second file can be recovered similarly, but by retaining only " " and "+ " lines; use ndiff with -r2; or, on Unix, the second file can be recovered by piping the output through sed -n '/^[+ ] /s/^..//p' """ __version__ = 1, 7, 0 import difflib, sys def fail(msg): out = sys.stderr.write out(msg + "\n\n") out(__doc__) return 0 # open a file & return the file object; gripe and return 0 if it # couldn't be opened def fopen(fname): try: return open(fname, 'U') except IOError, detail: return fail("couldn't open " + fname + ": " + str(detail)) # open two files & spray the diff to stdout; return false iff a problem def fcompare(f1name, f2name): f1 = fopen(f1name) f2 = fopen(f2name) if not f1 or not f2: return 0 a = f1.readlines(); f1.close() b = f2.readlines(); f2.close() for line in difflib.ndiff(a, b): print line, return 1 # crack args (sys.argv[1:] is normal) & compare; # return false iff a problem def main(args): import getopt try: opts, args = getopt.getopt(args, "qr:") except getopt.error, detail: return fail(str(detail)) noisy = 1 qseen = rseen = 0 for opt, val in opts: if opt == "-q": qseen = 1 noisy = 0 elif opt == "-r": rseen = 1 whichfile = val if qseen and rseen: return fail("can't specify both -q and -r") if rseen: if args: return fail("no args allowed with -r option") if whichfile in ("1", "2"): restore(whichfile) return 1 return fail("-r value must be 1 or 2") if len(args) != 2: return fail("need 2 filename args") f1name, f2name = args if noisy: print '-:', f1name print '+:', f2name return fcompare(f1name, f2name) # read ndiff output from stdin, and print file1 (which=='1') or # file2 (which=='2') to stdout def restore(which): restored = difflib.restore(sys.stdin.readlines(), which) sys.stdout.writelines(restored) if __name__ == '__main__': args = sys.argv[1:] if "-profile" in args: import profile, pstats args.remove("-profile") statf = "ndiff.pro" profile.run("main(args)", statf) stats = pstats.Stats(statf) stats.strip_dirs().sort_stats('time').print_stats() else: main(args)
Save
cmd:
run