def create_pynode(self,nodeName,code):
try:
- node=SALOME_PyNode.PyNode_i(nodeName,code,self._poa)
+ node=SALOME_PyNode.PyNode_i(nodeName,code,self._poa,self)
id_o = self._poa.activate_object(node)
comp_o = self._poa.id_to_reference(id_o)
comp_iors = self._orb.object_to_string(comp_o)
class PyNode_i (Engines__POA.PyNode,Generic):
"""The implementation of the PyNode CORBA IDL"""
- def __init__(self, nodeName,code,poa):
+ def __init__(self, nodeName,code,poa,my_container):
"""Initialize the node : compilation in the local context"""
Generic.__init__(self,poa)
self.nodeName=nodeName
self.code=code
+ self.my_container=my_container._container
linecache.cache[nodeName]=0,None,string.split(code,'\n'),nodeName
ccode=compile(code,nodeName,'exec')
self.context={}
+ self.context["my_container"] = self.my_container
exec ccode in self.context
def execute(self,funcName,argsin):