KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/22697/root/usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/22697/root/usr/lib64/python2.4/filecmp.pyo
mς
‚=5Dc@sίdZdkZdkZdkZdklZlZlZlZdddgZ	hZ
ddZddd	„Z
d
„Zd„Zdfd„ƒYZddd
„Zee
d„Zd„Zd„ZedjoeƒndS(sžUtilities for comparing files and directories.

Classes:
    dircmp

Functions:
    cmp(f1, f2, shallow=1) -> int
    cmpfiles(a, b, common) -> ([], [], [])

N(sifiltersifilterfalsesimapsiziptcmptdircmptcmpfilesiiicCs|dj	otidtƒntti|ƒƒ}tti|ƒƒ}|dtijp|dtijot
Sn|o||jotSn|d|djot
Snti||fƒ}|o#||f|d jo|dSnt||ƒ}|||ft||f<|S(s½Compare two files.

    Arguments:

    f1 -- First file name

    f2 -- Second file name

    shallow -- Just check stat signature (do not read the files).
               defaults to 1.

    use_statcache -- obsolete argument.

    Return value:

    True if the files are the same, False otherwise.

    This function uses a cache for past comparisons and the results,
    with a cache invalidation mechanism relying on stale signatures.

    s$use_statcache argument is deprecatediiiN(t
use_statcachetNonetwarningstwarntDeprecationWarningt_sigtoststattf1ts1tf2ts2tS_IFREGtFalsetshallowtTruet_cachetgettresultt_do_cmptoutcome(RR
RRRRRR((t/usr/lib64/python2.4/filecmp.pyRs$
	(cCsti|iƒ|i|ifS(N(R
tS_IFMTtsttst_modetst_sizetst_mtime(R((RR@scCsyt}t|dƒ}t|dƒ}xNtoF|i|ƒ}|i|ƒ}||jotSn|ptSq'q'WdS(Ntrb(tBUFSIZEtbufsizetopenRtfp1R
tfp2Rtreadtb1tb2R(RR
R"R%R&R#R ((RREs
cBsΘtZdZeed„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d„Zd	„Zd
„Z
ede	ded
edededededededededeƒZd„ZRS(sQA class that manages the comparison of 2 directories.

    dircmp(a,b,ignore=None,hide=None)
      A and B are directories.
      IGNORE is a list of names to ignore,
        defaults to ['RCS', 'CVS', 'tags'].
      HIDE is a list of names to hide,
        defaults to [os.curdir, os.pardir].

    High level usage:
      x = dircmp(dir1, dir2)
      x.report() -> prints a report on the differences between dir1 and dir2
       or
      x.report_partial_closure() -> prints report on differences between dir1
            and dir2, and reports on common immediate subdirectories.
      x.report_full_closure() -> like report_partial_closure,
            but fully recursive.

    Attributes:
     left_list, right_list: The files in dir1 and dir2,
        filtered by hide and ignore.
     common: a list of names in both dir1 and dir2.
     left_only, right_only: names only in dir1, dir2.
     common_dirs: subdirectories in both dir1 and dir2.
     common_files: files in both dir1 and dir2.
     common_funny: names in both dir1 and dir2 where the type differs between
        dir1 and dir2, or the name is not stat-able.
     same_files: list of identical files.
     diff_files: list of filenames which differ.
     funny_files: list of files which could not be compared.
     subdirs: a dictionary of dircmp objects, keyed by names in common_dirs.
     cCsq||_||_|djotiti	g|_n
||_|djodddg|_
n
||_
dS(NtRCStCVSttags(tatselftlefttbtrightthideRR	tcurdirtpardirtignore(R+R*R-R2R/((Rt__init__us		
	
cCsntti|iƒ|i|iƒ|_tti|iƒ|i|iƒ|_	|ii
ƒ|i	i
ƒdS(N(t_filterR	tlistdirR+R,R/R2t	left_listR.t
right_listtsort(R+((Rtphase0s
cCs»ttttii|iƒ|iƒƒ}ttttii|i	ƒ|i	ƒƒ}t|it
|i|ƒƒ|_t|it|i|ƒƒ|_t|it|i|ƒƒ|_dS(N(tdicttiziptimapR	tpathtnormcaseR+R6R*R7R-tmapt__getitem__tifilterthas_keytcommontifilterfalset	left_onlyt
right_only(R+R*R-((Rtphase1‰s
**!!c
Cs‰g|_g|_g|_xg|iD]\}tii|i	|ƒ}tii|i|ƒ}d}yti|ƒ}Wntij
o}	d}nXyti|ƒ}Wntij
o}	d}nX|o‘ti|iƒ}ti|iƒ}||jo|ii|ƒqti|ƒo|ii|ƒqti|ƒo|ii|ƒq|ii|ƒq%|ii|ƒq%WdS(Nii(R+tcommon_dirstcommon_filestcommon_funnyRCtxR	R=tjoinR,ta_pathR.tb_pathtokR
ta_statterrortwhytb_statRRta_typetb_typetappendtS_ISDIRtS_ISREG(
R+RNRORURSRTRPRMRKRR((Rtphase2s6			

cCs7t|i|i|iƒ}|\|_|_|_dS(N(	RR+R,R.RItxxt
same_filest
diff_filestfunny_files(R+RZ((Rtphase3³scCssh|_xc|iD]X}tii|i|ƒ}tii|i	|ƒ}t|||i|i
ƒ|i|<qWdS(N(R+tsubdirsRHRKR	R=RLR,ta_xR.tb_xRR2R/(R+R`RaRK((Rtphase4·s	
cCs2|iƒx!|iiƒD]}|iƒqWdS(N(R+RbR_t
itervaluestsdtphase4_closure(R+Rd((RReΑs
cCs>dG|iG|iGH|io(|iiƒdG|iGdG|iGHn|io(|iiƒdG|iGdG|iGHn|io|iiƒdG|iGHn|io|iiƒdG|iGHn|io|iiƒdG|iGHn|i	o|i	iƒdG|i	GHn|i
o|i
iƒdG|i
GHndS(	NtdiffsOnly int:sIdentical files :sDiffering files :sTrouble with common files :sCommon subdirectories :sCommon funny cases :(R+R,R.RER8RFR[R\R]RHRJ(R+((RtreportΖs,













cCs3|iƒx"|iiƒD]}H|iƒqWdS(N(R+RhR_RcRd(R+Rd((Rtreport_partial_closureίs

cCs3|iƒx"|iiƒD]}H|iƒqWdS(N(R+RhR_RcRdtreport_full_closure(R+Rd((RRjεs

R_R[R\R]RHRIRJRCRERFR6R7cCs;||ijo
t|‚n|i||ƒt||ƒS(N(tattrR+t	methodmaptAttributeErrortgetattr(R+Rk((Rt__getattr__ρs
(t__name__t
__module__t__doc__RR3R9RGRYR^RbReRhRiRjR:RlRo(((RRSs" 			#		
					c	CsŒ|dj	otidtƒngggf}xU|D]M}ti	i
||ƒ}ti	i
||ƒ}|t|||ƒi|ƒq7W|S(s„Compare common files in two directories.

    a, b -- directory names
    common -- list of file names found in both directories
    shallow -- if true, do comparison based solely on stat() information
    use_statcache -- obsolete argument

    Returns a tuple of three lists:
      files that compare equal
      files that are different
      filenames that aren't regular files.

    s$use_statcache argument is deprecatedN(RRRRRtresRCRKR	R=RLR*taxR-tbxt_cmpRRV(	R*R-RCRRRsRtRKRu((RRχs

	!cCs<y|||||ƒƒSWntij
odSnXdS(Ni(tabsRR*R-tshR	RQ(R*R-RxRwR((RRvscCstt|i|ƒƒS(N(tlistRDtskipt__contains__tflist(R|Rz((RR4scCsšdk}dk}|i|iddƒ\}}t|ƒdjo|iddƒ‚nt|d|dƒ}d|jo|i
ƒn|iƒdS(	Nitrisneed exactly two argsis-rt(s-rR~(tsystgetopttargvtoptionstargstlentGetoptErrorRRtddRjRh(R†RƒRR€R‚((Rtdemo%s		
t__main__(RrR	R
Rt	itertoolsRARDR<R;t__all__RRRRRRRRRwRvR4R‡Rp(RAR
RRŠRR‡R;RvR4RDRRRRR	R<RR((Rt?
s"			
*		€			


Anon7 - 2021