#NEWLINE# def list_all_vars( self ) : #NEWLINE# #INDENT# 'Return a list of all variables in this VarTree (recursive).' #NEWLINE# vnames = [ ] #NEWLINE# for ( name , obj ) in self . __dict__ . items ( ) : #NEWLINE# #INDENT# if name . startswith ( '_' ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if isinstance ( obj , VariableTree ) : #NEWLINE# #INDENT# vnames . extend ( [ '.' . join ( ( self . name , n ) ) for n in obj . list_all_vars ( ) ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# vnames . append ( '.' . join ( ( self . name , name ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return vnames