#NEWLINE# def _get_nodelist_recursive( node , nodes = None ) : #NEWLINE# #INDENT# if ( nodes is None ) : #NEWLINE# #INDENT# nodes = [ ] #NEWLINE# #UNINDENT# nodes . append ( node ) #NEWLINE# subnodes = getattr ( node , 'nodelist' , [ ] ) #NEWLINE# for subnode in subnodes : #NEWLINE# #INDENT# nodes += _get_nodelist_recursive ( subnode , nodes ) #NEWLINE# #UNINDENT# return nodes