#NEWLINE# def add_response( self , expr , name = None , scope = None ) : #NEWLINE# #INDENT# 'Adds a response to the driver.' #NEWLINE# super ( HasVarTreeResponses , self ) . add_response ( expr , name , scope ) #NEWLINE# path = ( _remove_spaces ( expr ) if ( name is None ) else name ) #NEWLINE# path = make_legal_path ( path ) #NEWLINE# obj = self . parent #NEWLINE# names = ( [ 'case_outputs' ] + path . split ( '.' ) ) #NEWLINE# for name in names [ : ( - 1 ) ] : #NEWLINE# #INDENT# if obj . get_trait ( name ) : #NEWLINE# #INDENT# val = obj . get ( name ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# val = VariableTree ( ) #NEWLINE# obj . add_trait ( name , VarTree ( val , iotype = 'out' ) ) #NEWLINE# #UNINDENT# obj = val #NEWLINE# #UNINDENT# name = names [ ( - 1 ) ] #NEWLINE# obj . add_trait ( name , List ( iotype = 'out' ) )