#NEWLINE# def _create_action( self , definition ) : #NEWLINE# #INDENT# ' Create an action implementation from an action definition. ' #NEWLINE# traits = { #NEWLINE# #INDENT# 'window' : self . window , #NEWLINE# #UNINDENT# } #NEWLINE# if ( len ( definition . name ) > 0 ) : #NEWLINE# #INDENT# traits [ 'name' ] = definition . name #NEWLINE# #UNINDENT# if ( len ( definition . class_name ) > 0 ) : #NEWLINE# #INDENT# action = self . _actions . get ( definition . class_name ) #NEWLINE# if ( action is None ) : #NEWLINE# #INDENT# klass = self . _import_symbol ( definition . class_name ) #NEWLINE# action = klass ( ** traits ) #NEWLINE# self . _actions [ definition . class_name ] = action #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# action = Action ( ** traits ) #NEWLINE# #UNINDENT# action . _action_set_ = definition . _action_set_ #NEWLINE# return action