import os
import sys
import string
-import omnipatch # PAL10310
+
+# On Win32, don't use omnipatch with omniOrb 4.0.7 so far
+if not sys.platform == "win32":
+ import omnipatch # PAL10310
+
from omniORB import CORBA, PortableServer
import SALOMEDS
import Engines, Engines__POA
#=============================================================================
#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()
register_name("CosNaming")
import CosNaming
-register_name("omnipatch")
-import omnipatch
+# On Win32, don't use omnipatch with omniOrb 4.0.7 so far
+if not sys.platform == "win32":
+ register_name("omnipatch")
+ import omnipatch
import Engines
import SALOME
# Module : SALOME
# $Header$
-import omnipatch
+import sys
+# On Win32, don't use omnipatch with omniOrb 4.0.7 so far
+if not sys.platform == "win32":
+ import omnipatch
+
from salome_kernel import *
from salome_study import *
from salome_iapp import *
import import_hook
# shared_imported, patterns, register_name, register_pattern
# will be shared by all Python sub interpretors
-from omnipatch import shared_imported
+
+# On Win32, don't use omnipatch with omniOrb 4.0.7 so far
+if not sys.platform == "win32":
+ from omnipatch import shared_imported
+
import_hook.shared_imported=shared_imported
from import_hook import patterns
from import_hook import register_name