���� ������������������������������������  fc@sddlZddlZddlZdZejdZejdZdZdZdZ dZ d Z e d kryej eWqek rej d qXndS( iNcCstjd}|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}|sPn|d |}qhWtj|dkrtjd \\}}\} } n:tj|dkrOtjd \\}}\} } nqO|| | !j d} x6| D].} | j } | |kr.|j | q.q.WqOWdS( Ntris.pyis\iit,( topentostpathtbasenametreadlinetm_importtmatchtregstm_fromtsplittstriptappend( tfilenameRtfptmodtlisttlinetnextlinetatbta1tb1twordstword((s+/usr/lib64/python2.7/Tools/scripts/pdeps.pyRBs0   ""   cCs|j}i}x|D]}||||s