If SALOME_PYTHON environment variable (path to the installed python executable)
is defined use it for the file argument.
This variable can be used in place of the dangerous use of PYTHONHOME.
MESSAGE("=================================================================");
// set stdout to line buffering (aka C++ std::cout)
setvbuf(stdout, (char *)NULL, _IOLBF, BUFSIZ);
- Py_SetProgramName(argv[0]);
+ char* salome_python=getenv("SALOME_PYTHON");
+ if(salome_python != 0)
+ Py_SetProgramName(salome_python);
Py_Initialize(); // Initialize the interpreter
PySys_SetArgv(argc, argv);
KERNEL_PYTHON::_interp = PyThreadState_Get()->interp;