;ς -ηβCc@s^dZdddfZdklZdZdkZeidƒid„Zdd „Z [d „Z d „Z d „Z d „Z d„Zd„Zd„Zd„Zd„Zd„Zd„Zedjo’dkZeidZdejoadkZdkZeidƒdZeideƒeieƒZei ƒi!dƒi"ƒqZeeƒndS(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' See module comments for details and programmatic interface. ii(sSequenceMatcheriNs \s*#?\s*$cCs||ƒtj SdS(N(spatslinesNone(slinespat((slib/compat_ndiff.pys IS_LINE_JUNKmss cCs||jSdS(N(schsws(schsws((slib/compat_ndiff.pysIS_CHARACTER_JUNKpscCs*x#t||ƒD]}|G||GqWdS(N(sxrangesloshisistagsx(stagsxsloshisi((slib/compat_ndiff.pysdumpvscCsŠ||jo ||jpt‚||||jo*td|||ƒtd|||ƒn'td|||ƒtd|||ƒdS(Ns+s-(salosahisblosbhisAssertionErrorsdumpsbsa(sasalosahisbsblosbhi((slib/compat_ndiff.pys plain_replacezs !cCs•to?dG|G|G|G|GHtd|||ƒtd|||ƒnddf\}}t t ƒ}t t f\}}xρt||ƒD]ΰ}||}|i|ƒxΐt||ƒD]―}||}||jo*|t jo||f\}}q³q³n|i|ƒ|iƒ|jo#|iƒ|jo|iƒ|jo"|iƒ||f\}} } q³q³Wq†W||joJ|t jo!t||||||ƒdSn||df\} } }nt }toCdG|G| G| GHtd|| | dƒtd|| | dƒnt||| ||| ƒ|| || f\}}|t jod }}|i"||ƒxγ|i#ƒD]Υ\} }}}}||||f\} } | d jo |d | }|d | }qx| d jo|d | }qx| djo|d| }qx| djo |d| }|d| }qxt+d| ‚qxWt,||||ƒn dG|Gt|| d||| d|ƒdS(Ns*** fancy_replaces>s           cCsldk}hdd<dd<|}d|f}x4|iiƒD]#}|d |jo |dGqAqAWdS(Ns1s- s2s+ s i(ssysswhichstagsprefixessstdins readlinessline(swhichssyssprefixesslinestag((slib/compat_ndiff.pysrestoreGs  s__main__s-profiles ndiff.pros main(args)stime(#s__doc__s __version__scompat_difflibsSequenceMatchersTRACEsrescompilesmatchs IS_LINE_JUNKsIS_CHARACTER_JUNKsdumps plain_replaces fancy_replaces fancy_helpersprintqs count_leadingsfailsfopensfcomparesmainsrestores__name__ssyssargvsargssprofilespstatssremovesstatfsrunsStatssstatss strip_dirss sort_statss print_stats(sprintqsrestoresdumpsfails plain_replacesfopensstatssstatfsres IS_LINE_JUNKsmainsSequenceMatchersprofilesfcomparesargsssyss fancy_replacesIS_CHARACTER_JUNKs __version__s fancy_helpersTRACEs count_leadingspstats((slib/compat_ndiff.pys?.s:6      U