From: imn Date: Mon, 19 Dec 2016 14:39:38 +0000 (+0300) Subject: Fixed problem with loading python modules X-Git-Tag: Before_python3_27062017~1^2~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d9d2c59119f71ade3fb9485eef19fba3f25b6f5d;p=modules%2Fkernel.git Fixed problem with loading python modules --- diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index 085651006..06cd2c382 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -928,7 +928,7 @@ Engines_Container_i::createPythonInstance(std::string CompName, PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *result = PyObject_CallMethod(_pyCont, (char*)"create_component_instance", - (char*)"ssl", + (char*)"ss", CompName.c_str(), instanceName.c_str()); const char *ior; @@ -967,10 +967,9 @@ Engines_Container_i::create_python_service_instance(const char * CompName, PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *result = PyObject_CallMethod(_pyCont, (char*)"create_component_instance", - (char*)"ssl", + (char*)"ss", CompName, - instanceName.c_str(), - 0); + instanceName.c_str()); const char *ior; const char *error; PyArg_ParseTuple(result,"ss", &ior, &error); diff --git a/src/Container/SALOME_ContainerPy.py b/src/Container/SALOME_ContainerPy.py index 3a8b2bf40..69316736f 100755 --- a/src/Container/SALOME_ContainerPy.py +++ b/src/Container/SALOME_ContainerPy.py @@ -244,7 +244,7 @@ class SALOME_ContainerPy_i (Engines__POA.Container): #------------------------------------------------------------------------- def create_python_service_instance(self, CompName): - return self.create_component_instance(CompName, 0) + return self.create_component_instance(CompName) #-------------------------------------------------------------------------