Salome HOME
Join modifications from branch OCC_debug_for_3_2_0b1
[samples/calculator.git] / src / CALCULATOR / CALCULATOR_TEST.py
index 5b5ae2421d4c1490da94f1b543696b6046e74227..656f35e3c1584ee0a88d7c3da6efc7dc78e82c84 100644 (file)
@@ -1,7 +1,39 @@
+#  Copyright (C) 2005  CEA/DEN, EDF R&D
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/
+#
+from omniORB import CORBA
+
 import salome
 import SALOME
 import SALOME_MED
 
+#CCRT :
+import os
+import Engines
+import LifeCycleCORBA
+
+host = os.getenv( 'HOST' )
+
+orb = CORBA.ORB_init([''], CORBA.ORB_ID)
+
+lcc = LifeCycleCORBA.LifeCycleCORBA(orb)
+#endCCRT
+
 ################   GET A MED FIELD FROM FILE pointe.med   ###################
 #
 # This test program is based on the field named fieldcelldoublevector in 
@@ -10,11 +42,12 @@ from os import environ
 filePath=environ["MED_ROOT_DIR"]
 filePath=filePath+"/share/salome/resources/"
 medFile=filePath+"pointe.med"
-fieldname = "fieldcelldouble"
+fieldname = "fieldcelldoublescalar"
 
 # Launch the Med Component and use it to load into memory the test field 
 print "Launch the Med Component: "
-med_comp = salome.lcc.FindOrLoadComponent("FactoryServer", "MED")
+#CCRTmed_comp = salome.lcc.FindOrLoadComponent("FactoryServer", "MED")
+med_comp = lcc.FindOrLoadComponent("FactoryServer", "MED")
 
 # Get a Corba field proxy on the distant field (located in the med_comp server).
 try: