#NEWLINE# def format_table( code_string ) : #NEWLINE# #INDENT# s_table = symtable ( code_string , 'string' , 'exec' ) #NEWLINE# table = [ ] #NEWLINE# for child in s_table . get_children ( ) : #NEWLINE# #INDENT# row = { #NEWLINE# #INDENT# 'name' : child . get_name ( ) , #NEWLINE# 'scope' : 'global' , #NEWLINE# 'children' : [ subchild . get_name ( ) for subchild in child . get_children ( ) ] , #NEWLINE# #UNINDENT# } #NEWLINE# table . append ( row ) #NEWLINE# #UNINDENT# return ( s_table , table )