/usr/lib64/python2.6/Tools/scripts
Edit: /usr/lib64/python2.6/Tools/scripts/ndiff.pyo (3891B)
Ñò
« gc @ sñ d Z d Z d d k Z d d k Z d „ Z d „ Z d „ Z d „ Z d
„ Z e d j o e i
d Z d e j og d d k Z d d k
Z
e i d ƒ d
Z e i d e ƒ e
i e ƒ Z e i ƒ i d ƒ i ƒ qí e e ƒ n d S( s‡ 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'
i i i iÿÿÿÿNc C s( t i i } | | d ƒ | t ƒ d S( Ns
i ( t syst stderrt writet __doc__( t msgt out( ( s+ /usr/lib64/python2.6/Tools/scripts/ndiff.pyt fail5 s
c C sF y t | d ƒ SWn. t j
o" } t d | d t | ƒ ƒ SXd S( Nt Us couldn't open s : ( t opent IOErrorR t str( t fnamet detail( ( s+ /usr/lib64/python2.6/Tools/scripts/ndiff.pyt fopen= s c C s~ t | ƒ } t | ƒ } | p | o d S| i ƒ } | i ƒ | i ƒ } | i ƒ x t i | | ƒ D]
} | Gql Wd S( Ni i ( R
t readlinest closet difflibt ndiff( t f1namet f2namet f1t f2t at bt line( ( s+ /usr/lib64/python2.6/Tools/scripts/ndiff.pyt fcompareD s
c C s^ d d k } y | i | d ƒ \ } } Wn% | i j
o } t t | ƒ ƒ SXd } d } } xN | D]F \ } } | d j o d } d } qg | d j o d } | } qg qg W| o | o t d ƒ S| o9 | o t d ƒ S| d j o t | ƒ d St d ƒ St | ƒ d j o t d
ƒ S| \ }
} | o d G|
GHd G| GHn t |
| ƒ S( Niÿÿÿÿs qr:i i s -qs -rs can't specify both -q and -rs no args allowed with -r optiont 1t 2s -r value must be 1 or 2i s need 2 filename argss -:s +:( R R ( t getoptt errorR R
t restoret lenR ( t argsR t optsR t noisyt qseent rseent optt valt whichfileR R ( ( s+ /usr/lib64/python2.6/Tools/scripts/ndiff.pyt mainT s>
c C s/ t i t i i ƒ | ƒ } t i i | ƒ d S( N( R R R t stdinR t stdoutt
writelines( t whicht restored( ( s+ /usr/lib64/python2.6/Tools/scripts/ndiff.pyR w s t __main__s -profiles ndiff.pros
main(args)t time( i i i ( R t __version__R R R R
R R( R t __name__t argvR t profilet pstatst removet statft runt Statst statst
strip_dirst
sort_statst print_stats( ( ( s+ /usr/lib64/python2.6/Tools/scripts/ndiff.pyt
/ s" #