Salome HOME
Merge GUI developments from BR_GUI
[tools/hxx2salome.git] / CppExamples / COMPO_CXX_SRC / src / CALCULATOR / CALCULATOR_TEST / CALCULATOR_test.py
1 from os import getenv
2 if getenv("SALOMEPATH"):
3     import salome
4     import CALCULATOR_ORB
5     myCalc = salome.lcc.FindOrLoadComponent("FactoryServer", "CALCULATOR")
6     IN_SALOME_GUI = 1
7 else:
8     import CALCULATORSWIG
9     myCalc=CALCULATORSWIG.CALCULATOR()
10 pass
11 #
12 #
13 print "Test Program of CALCULATOR component"
14
15 f1 = myCalc.createConstField(2.0);
16 f2 = myCalc.createConstField(3.0);
17 f = myCalc.add(f1,f2);
18 myCalc.printField(f);
19
20