From 575dbf6e73eaad73901ea2ad46d0a53028edbde2 Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 8 Dec 2008 14:44:10 +0000 Subject: [PATCH] Add comments. --- src/KERNEL_PY/salome_notebook.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/KERNEL_PY/salome_notebook.py b/src/KERNEL_PY/salome_notebook.py index efb0279eb..cdc5a5ad1 100644 --- a/src/KERNEL_PY/salome_notebook.py +++ b/src/KERNEL_PY/salome_notebook.py @@ -35,6 +35,10 @@ class NoteBook: self.myStudy = Study def set(self, variableName, variable): + """ + Create (or modify) variable with name "variableName" + and value equal "theValue". + """ if type(variable) == float: self.myStudy.SetReal(variableName, variable) @@ -45,6 +49,9 @@ class NoteBook: self.myStudy.SetBoolean(variableName, variable) def get(self, variableName): + """ + Return value of the variable with name "variableName". + """ aResult = None if self.myStudy.IsVariable(variableName): @@ -59,7 +66,11 @@ class NoteBook: return aResult - def isVariable(self, variableName): + def isVariable(self, variableName): + """ + Return true if variable with name "variableName" + exists in the study, otherwise return false. + """ return self.myStudy.IsVariable(variableName) -notebook = NoteBook(salome.myStudy) +notebook = NoteBook(salome.myStudy) \ No newline at end of file -- 2.39.2