;ò fë9Gc @s<dZdkZdkZdkZdkZdkZdkZy eƒZWndk Z e i ZnXd„Z d„Z d„Z d„Zd„Zd„Zd„Zed jo‡eiƒZeid d d ed dddƒ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 NcCsŸ|d}|tijoti|}nti|}||d %s;s}s (sparserssuites python_codesastsast2listsast_lists call_graphsconstruct_call_graphsdotsappends iteritemssfrom_fnsto_fnssto_fnsjoin(s python_codesastsast_liststo_fnssto_fnsfrom_fnsdots call_graph((s0/home/ellina/mydata/code/construct_call_graph.pysgenerate_dot_codeVs$      s__main__s-is --input-filesdefaultsmetavarsFILEshelpspython code file to process( s__doc__ssyssparserssymbolstokenspprintsoptparsessetssssetssSetsannotate_ast_lists get_atom_namesget_fn_call_datas find_fn_calls process_fnsconstruct_call_graphsgenerate_dot_codes__name__s OptionParsersoparsers add_optionsNones parse_argssoptionssargss input_filesopensreads python_codesstdinsdot_code(ssetsparsersgenerate_dot_codesoparsersget_fn_call_dataspprintstokens python_codes process_fnsannotate_ast_listsconstruct_call_graphsoptparsessymbolsargsssyss get_atom_names find_fn_callssssetssdot_codesoptions((s0/home/ellina/mydata/code/construct_call_graph.pys? s2          "