pickledArgs getValueOfVarInContext(in string varName) raises (SALOME::SALOME_Exception);
+
+ void assignVarInContext(in string varName, in pickledArgs value) raises (SALOME::SALOME_Exception);
+
+ pickledArgs callMethodOnVarInContext(in string varName, in string methodName, in pickledArgs args) raises (SALOME::SALOME_Exception);
} ;
};
exc_typ,exc_val,exc_fr=sys.exc_info()
l=traceback.format_exception(exc_typ,exc_val,exc_fr)
raise SALOME.SALOME_Exception(SALOME.ExceptionStruct(SALOME.BAD_PARAM,"".join(l),"PyScriptNode: %s" %self.nodeName,0))
+ pass
+
+ def assignVarInContext(self, varName, value):
+ try:
+ self.context[varName][0] = pickle.loads(value)
+ except:
+ exc_typ,exc_val,exc_fr=sys.exc_info()
+ l=traceback.format_exception(exc_typ,exc_val,exc_fr)
+ raise SALOME.SALOME_Exception(SALOME.ExceptionStruct(SALOME.BAD_PARAM,"".join(l),"PyScriptNode: %s" %self.nodeName,0))
+ pass
+
+ def callMethodOnVarInContext(self, varName, methodName, args):
+ try:
+ return pickle.dumps( getattr(self.context[varName][0],methodName)(*pickle.loads(args)),-1 )
+ except:
+ exc_typ,exc_val,exc_fr=sys.exc_info()
+ l=traceback.format_exception(exc_typ,exc_val,exc_fr)
+ raise SALOME.SALOME_Exception(SALOME.ExceptionStruct(SALOME.BAD_PARAM,"".join(l),"PyScriptNode: %s" %self.nodeName,0))
+ pass