ó fc@sÀddlZddlZddlZd„ZejdƒZejdƒZd„Zd„Zd„Z d„Z d „Z e d kr¼yej eƒƒWq¼ek r¸ej d ƒq¼XndS( iÿÿÿÿNcCs¤tjd}|sdGHdSi}x|D]}t||ƒq)WdGHt|ƒdGHt|ƒ}t|ƒdGHt|ƒ}t|ƒdGHt|ƒ}t|ƒdS( Nis usage: pdeps file.py file.py ...is --- Uses ---s--- Used By ---s--- Closure of Uses ---s--- Closure of Used By ---i(tsystargvtprocesst printresultstinversetclosure(targsttabletargtinvtreachtinvreach((s+/usr/lib64/python2.7/Tools/scripts/pdeps.pytmains&         s^[ ]*from[ ]+([^ ]+)[ ]+s^[ ]*import[ ]+([^#]+)c Csht|dƒ}tjj|ƒ}|ddkr>|d }ng||<}x|jƒ}|sePnx8|ddkrŸ|jƒ}|sŽPn|d |}qhWtj|ƒdkr×tjd \\}}\} } n:tj|ƒdkrOtjd \\}}\} } nqO|| | !j dƒ} x6| D].} | j ƒ} | |kr.|j | ƒq.q.WqOWdS( Ntriýÿÿÿs.pyiÿÿÿÿs\iit,( topentostpathtbasenametreadlinetm_importtmatchtregstm_fromtsplittstriptappend( tfilenameRtfptmodtlisttlinetnextlinetatbta1tb1twordstword((s+/usr/lib64/python2.7/Tools/scripts/pdeps.pyRBs0   ""   cCsÃ|jƒ}i}x|D]}||||s