ó ƒfüec@s_dZddlZddlZdZejeƒZd„Zd„Zedkr[eƒndS(såCreate a TAGS file for Python programs, usable with GNU Emacs. usage: eptags pyfiles... The output TAGS file is usable with Emacs version 18, 19, 20. Tagged are: - functions (even inside other defs or classes) - classes eptags warns about files it cannot open. eptags will not give warnings about duplicate tags. BUGS: Because of tag duplication (methods with the same name in different classes), TAGS files are not very useful for most object-oriented python projects. iÿÿÿÿNs;^[ \t]*(def|class)[ \t]+([a-zA-Z_][a-zA-Z0-9_]*)[ \t]*[:\(]c Cs yt|dƒ}Wntjjd|ƒdSXd}d}g}d}x…|jƒ}|scPn|d}tj|ƒ}|r¿|jdƒd||f} |j| ƒ|t | ƒ}n|t |ƒ}qM|jd||fƒx|D]} |j| ƒqðWdS(sCAppend tags found in file named 'filename' to the open file 'outfp'trsCannot open %s Niis%d,%d s %s,%d ( topentsyststderrtwritetreadlinetmatchertsearchtgrouptappendtlen( tfilenametoutfptfptcharnotlinenottagstsizetlinetmttag((s,/usr/lib64/python2.7/Tools/scripts/eptags.pyt treat_files.    cCs8tddƒ}x"tjdD]}t||ƒqWdS(NtTAGStwi(RRtargvR(R R ((s,/usr/lib64/python2.7/Tools/scripts/eptags.pytmain2st__main__( t__doc__RtretexprtcompileRRRt__name__(((s,/usr/lib64/python2.7/Tools/scripts/eptags.pyts