from SALOME_PyNode import ExchangeModeServerSideFactory
from KernelBasis import VerbosityActivated,SetVerbosityLevel,SetVerbosityActivated
from salome_utils import positionVerbosityOfLoggerRegardingState
-import CORBA
import Engines
+import salome
import os
+salome.salome_init()
from datetime import datetime
SetVerbosityActivated( {} )
SetVerbosityLevel( "{}" )
positionVerbosityOfLoggerRegardingState()
# WorkDir may be important to replay : "{}"
-orb = CORBA.ORB_init([''])
+orb = salome.orb
caseDirectory = "{}"
contextExchangeMode = "{}"
bigObjExchanger = ExchangeModeServerSideFactory( contextExchangeMode )
codeFileName = os.path.join( caseDirectory, "{}" )
inputFileName = "{}"
outputFileName = "{}"
-del os
outputsKeys = {}
exec( "{{}} = LogOfCurrentExecutionSession( orb.string_to_object( \\"{}\\" ) )".format(MY_PERFORMANCE_LOG_ENTRY_IN_GLBS) )
if VerbosityActivated():
pman.activate()
obj = SenderByte_i(poa, pickle.dumps( context) ) ; id_o = poa.activate_object(obj) ; refPtr = poa.id_to_reference(id_o)
self._data_exchange_channel.pushOutputContext( refPtr )
+ pman.deactivate(True,True)
def ExchangeModeServerSideFactory( exchangeMode ):
if exchangeMode == "File":
import tempfile
import pickle
import subprocess as sp
- import CORBA
import logging
#
def IsConsideredAsOKRun( returnCode, closeEyesOnErrorAtExit , stderr ):
#
def InternalExecResistant( exchangeMode, code, context, outargsname):
import KernelBasis
- orb = CORBA.ORB_init([''])
+ import salome
+ salome.salome_init()
+ orb = salome.orb
iorScriptLog = orb.object_to_string( instanceOfLogOfCurrentSession._remote_handle )#ref ContainerScriptPerfLog_ptr
####
EXEC_CODE_FNAME_PXF = "execsafe_"