ó x”þfc@s}dZddlZddlZddlZddlZd„Zd„Zd„Zd„Ze dkryej eƒƒndS(s finddiv - a grep-like tool that looks for division operators. Usage: finddiv [-l] file_or_directory ... For directory arguments, all files in the directory whose name ends in .py are processed, and subdirectories are processed recursively. This actually tokenizes the files to avoid false hits in comments or strings literals. By default, this prints all lines containing a / or /= operator, in grep -n style. With the -l option specified, it prints the filename of files that contain at least one / or /= operator. iÿÿÿÿNc CsØy#tjtjddƒ\}}Wn!tjk rF}t|ƒdSX|s[tdƒdSd}x>|D]6\}}|dkr‰tGHdS|dkrhd}qhqhWd}x)|D]!}t||ƒ}|pÍ|}q¯W|S(Nitlhis&at least one file argument is requiredis-hs-l(tgetopttsystargvterrortusaget__doc__tNonetprocess( toptstargstmsgt listnamestotatexittfilenametx((s-/usr/lib64/python2.7/Tools/scripts/finddiv.pytmains(#      cCs[tjjdtjd|fƒtjjdtjdƒtjjdtjdƒdS(Ns%s: %s isUsage: %s [-l] file ... s"Try `%s -h' for more information. (RtstderrtwriteR(R ((s-/usr/lib64/python2.7/Tools/scripts/finddiv.pyR-s!c Csêtjj|ƒrt||ƒSyt|ƒ}Wn(tk rY}tjjd|ƒdSXt j |j ƒ}d}xg|D]_\}}\}} } } |dkry|r¯|GHPn||krØ|}d||| fGqØqyqyW|j ƒdS(NsCan't open: %s it/s/=s%s:%d:%s(Rs/=(tostpathtisdirt processdirtopentIOErrorRRRttokenizetgenerate_tokenstreadlineRtclose( RR tfpR tgtlastrowttypettokentrowtcoltendtline((s-/usr/lib64/python2.7/Tools/scripts/finddiv.pyR2s$ "  c Csðytj|ƒ}Wn+tjk r@}tjjd|ƒdSXg}x`|D]X}tjj||ƒ}tjj|ƒj dƒs–tjj |ƒrN|j |ƒqNqNW|j d„ƒd}x)|D]!}t||ƒ}|på|}qÇW|S(NsCan't list directory: %s is.pycSs%ttjj|ƒtjj|ƒƒS(N(tcmpRRtnormcase(Rtb((s-/usr/lib64/python2.7/Tools/scripts/finddiv.pytQs(RtlistdirRRRRRtjoinR*tendswithRtappendtsortRR( tdirR tnamesR tfilestnametfnRR((s-/usr/lib64/python2.7/Tools/scripts/finddiv.pyRFs  - t__main__( RRRRRRRRRt__name__R(((s-/usr/lib64/python2.7/Tools/scripts/finddiv.pyts