]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Some useful methods for remote access of PyScriptNode agy/mem_peak_0
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 8 Apr 2020 08:41:39 +0000 (10:41 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 8 Apr 2020 08:41:39 +0000 (10:41 +0200)
idl/SALOME_PyNode.idl
src/Container/SALOME_PyNode.py

index 2e017f9c6f39889fd2bf177c6ed3a08777e5ecfc..efdb6d855cbe399a7b9f6abfc00ed23531f71a82 100644 (file)
@@ -37,9 +37,16 @@ module Engines
 {
   typedef sequence<octet> pickledArgs;
   typedef sequence<string> listofstring;
+  interface Container;
 
   interface PyNodeBase : SALOME::GenericObj
   {
+    Container getContainer();
+
+    string getCode();
+
+    string getName();
+
     /*!
       This method allows to define a new global var called \a varName. This newly created var will be
       set to value \a valueOfVar.
index fec7107ae0921fb4133d6731d6a8afc5b17828ae..dee1f18969b0a37ebc5ed98ffbba9845cf8e4d8f 100644 (file)
@@ -68,6 +68,15 @@ class PyNode_i (Engines__POA.PyNode,Generic):
     self.context["my_container"] = self.my_container
     exec(ccode, self.context)
 
+  def getContainer(self):
+    return self.my_container
+
+  def getCode(self):
+    return self.code
+
+  def getName(self):
+    return self.nodeName
+
   def defineNewCustomVar(self,varName,valueOfVar):
     self.context[varName] = pickle.loads(valueOfVar)
     pass
@@ -106,6 +115,15 @@ class PyScriptNode_i (Engines__POA.PyScriptNode,Generic):
     self.context={}
     self.context["my_container"] = self.my_container
 
+  def getContainer(self):
+    return self.my_container
+
+  def getCode(self):
+    return self.code
+
+  def getName(self):
+    return self.nodeName
+
   def defineNewCustomVar(self,varName,valueOfVar):
     self.context[varName] = pickle.loads(valueOfVar)
     pass