From f117565dd89a8167a5fd5e740d80cc93b5aead33 Mon Sep 17 00:00:00 2001 From: san Date: Mon, 17 Apr 2006 15:24:16 +0000 Subject: [PATCH] Not using omnipatch on Win32 --- src/Container/SALOME_ContainerPy.py | 10 +++++++++- src/KERNEL_PY/kernel_shared_modules.py | 6 ++++-- src/KERNEL_PY/salome.py | 6 +++++- src/KERNEL_PY/salome_shared_modules.py | 6 +++++- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/Container/SALOME_ContainerPy.py b/src/Container/SALOME_ContainerPy.py index 0ee6b8cd0..61e2626b4 100755 --- a/src/Container/SALOME_ContainerPy.py +++ b/src/Container/SALOME_ContainerPy.py @@ -31,7 +31,11 @@ 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 @@ -309,15 +313,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() diff --git a/src/KERNEL_PY/kernel_shared_modules.py b/src/KERNEL_PY/kernel_shared_modules.py index ed8618789..bf391f811 100755 --- a/src/KERNEL_PY/kernel_shared_modules.py +++ b/src/KERNEL_PY/kernel_shared_modules.py @@ -22,8 +22,10 @@ import omniORB 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 diff --git a/src/KERNEL_PY/salome.py b/src/KERNEL_PY/salome.py index d853b2cb6..58299dbc5 100755 --- a/src/KERNEL_PY/salome.py +++ b/src/KERNEL_PY/salome.py @@ -24,7 +24,11 @@ # 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 * diff --git a/src/KERNEL_PY/salome_shared_modules.py b/src/KERNEL_PY/salome_shared_modules.py index 1029e279e..174abb19f 100755 --- a/src/KERNEL_PY/salome_shared_modules.py +++ b/src/KERNEL_PY/salome_shared_modules.py @@ -56,7 +56,11 @@ import glob,os,sys 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 -- 2.39.2