Salome HOME
Fix compilation pb.
[modules/kernel.git] / src / Container / SALOME_ContainerPy.py
index 23ac0195ace0477af9dbb4b8d7e5b19e7096f68e..843fa794f49f7ff1e5584af6b6d4ac9bdf0ef9c0 100755 (executable)
@@ -19,7 +19,7 @@
 #  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 #
 #
 import os
 import sys
 import string
+
 from omniORB import CORBA, PortableServer
-# import SALOMEDS before other SALOME modules
-# (if not, incomplete import done by SALOME module: no load of SALOMEDS_attributes)
 import SALOMEDS 
 import Engines, Engines__POA
-reload(Engines)
-reload(Engines__POA)
 from SALOME_NamingServicePy import *
 from SALOME_ComponentPy import *
 
 from SALOME_utilities import *
 from Utils_Identity import getShortHostName
+from launchConfigureParser import verbose
 
 #=============================================================================
 
@@ -64,7 +62,7 @@ class SALOME_ContainerPy_i (Engines__POA.Container):
         Container_path = "/Containers/" + myMachine + "/" + containerName
         #self._containerName = containerName
         self._containerName = Container_path
-        print "container name ",self._containerName
+        if verbose(): print "container name ",self._containerName
 
         naming_service = SALOME_NamingServicePy_i(self._orb)
         self._naming_service = naming_service
@@ -173,9 +171,9 @@ class SALOME_ContainerPy_i (Engines__POA.Container):
         MESSAGE( "SALOME_Container_i::import_component" )
         ret=0
         try:
-            print "try import ",componentName
+            if verbose(): print "try import ",componentName
             __import__(componentName)
-            print "import ",componentName," successful"
+            if verbose(): print "import ",componentName," successful"
             ret=1
         except:
             import traceback
@@ -312,15 +310,19 @@ class SALOME_ContainerPy_i (Engines__POA.Container):
 #=============================================================================
 
 #initialise the ORB and find the root POA
+print "Starting ",sys.argv[1]
 orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
 poa = orb.resolve_initial_references("RootPOA")
+print "ORB and POA initialized"
 
 #create an instance of SALOME_ContainerPy_i and a Container reference
 #containerName = "FactoryServerPy"
 MESSAGE( str(sys.argv) )
 containerName = sys.argv[1]
 cpy_i = SALOME_ContainerPy_i(orb, poa, containerName)
+print "SALOME_ContainerPy_i instance created ",cpy_i 
 cpy_o = cpy_i._this()
+print "SALOME_ContainerPy_i instance activated ",cpy_o
 
 #activate the POA
 poaManager = poa._get_the_POAManager()