Ñò fë9Gc@sQdZddkZddkZddkZddkZddkZddkZy eƒZWnddk Z e i ZnXd„Z d„Z d„Z d„Zd„Zd„Zd „Zed jo‡eiƒZeid d d dddddƒeiƒ\ZZeioeeiƒiƒZneiiƒZeeƒZeGHndS(sì generates call graph of given python code file in dot format input for graphviz. limitations: * statically tried to figure out functions calls * does not understand classes * algorithm is naive and may not statically find all cases iÿÿÿÿNcCs›|d}|tijoti|}nti|}||d %s;t}s (tparsertsuitetast2listR'tappendt iteritemstjoin(t python_codetastRR"tdottfrom_fntto_fnstto_fn((s0/home/ellina/mydata/code/construct_call_graph.pytgenerate_dot_codeVs$      t__main__s-is --input-filetdefaulttmetavartFILEthelpspython code file to process( t__doc__tsysR)RRtpprinttoptparseR tstsetstSetRRRRR%R'R5t__name__t OptionParsertoparsert add_optionR t parse_argstoptionstargst input_filetopentreadR/tstdintdot_code(((s0/home/ellina/mydata/code/construct_call_graph.pyt s4           "