Viewing File: /usr/lib64/python2.7/Tools/scripts/diff.pyc

ó
ó—sjc@sedZddlZddlZddlZddlZddlZd„ZedkraeƒndS(sS Command line interface to difflib.py providing diffs in four formats:

* ndiff:    lists every line and highlights interline changes.
* context:  highlights clusters of changes in a before/after format.
* unified:  highlights clusters of changes in an inline format.
* html:     generates side by side comparison with change highlights.

iÿÿÿÿNc	CsGd}tj|ƒ}|jddddtddƒ|jddddtdd	ƒ|jd
dddtddƒ|jddddtdd
ƒ|jddddddddƒ|jƒ\}}t|ƒdkrñ|jƒtjdƒnt|ƒdkr|j	dƒn|j
}|\}}tjt
j|ƒjƒ}tjt
j|ƒjƒ}t|dƒjƒ}	t|dƒjƒ}
|jr¸tj|	|
||||d|ƒ}n{|jrÖtj|	|
ƒ}n]|jrtjƒj|	|
||d|jd|ƒ}n$tj|	|
||||d|ƒ}tjj|ƒdS(Ns&usage: %prog [options] fromfile tofiles-ctactiont
store_truetdefaultthelps'Produce a context format diff (default)s-usProduce a unified format diffs-msAProduce HTML side by side diff (can use -c and -l in conjunction)s-nsProduce a ndiff format diffs-ls--linesttypetintis'Set number of context lines (default 3)iiis*need to specify both a fromfile and tofiletUtntcontexttnumlines(toptparsetOptionParsert
add_optiontFalset
parse_argstlent
print_helptsystexitterrortlinesttimetctimetoststattst_mtimetopent	readlinestutdifflibtunified_diffRtndifftmtHtmlDifft	make_filetctcontext_difftstdoutt
writelines(tusagetparsertoptionstargsRtfromfilettofiletfromdatettodatet	fromlinesttolinestdiff((s*/usr/lib64/python2.7/Tools/scripts/diff.pytmain
s6"
		'		0$t__main__(t__doc__RRRRR
R2t__name__(((s*/usr/lib64/python2.7/Tools/scripts/diff.pyt<module>	s<	$
Back to Directory File Manager