7ec@skddlZddlZddlZgZdZdZejeZdZe dkrgendS(iNcCsltjd}x|D]}t|qWtrhtdd}tjxtD]}|j|qNWndS(Nittagstw(tsystargvt treat_fileRtopentsorttwrite(targstfilenametfpts((s+/usr/lib64/python2.7/Tools/scripts/ptags.pytmains    s/^[ ]*(def|class)[ ]+([a-zA-Z0-9_]+)[ ]*[:\(]cCsyt|d}Wntjjd|dSXtjj|}|ddkra|d }n|d|dd}tj|xw|j }|sPnt j |}|r|j d}|j d}|d|d |d }tj|qqWdS( NtrsCannot open %s is.pys s1 iis /^s/ ( RRtstderrRtostpathtbasenameRtappendtreadlinetmatchertmatchtgroup(R R tbaseR tlinetmtcontenttname((s+/usr/lib64/python2.7/Tools/scripts/ptags.pyRs(   t__main__( RtreRRR texprtcompileRRt__name__(((s+/usr/lib64/python2.7/Tools/scripts/ptags.pyt s$