From f014574a0e7a7ec872344f97c91d6997613e8ed1 Mon Sep 17 00:00:00 2001 From: Gilles DAVID Date: Wed, 31 May 2017 08:35:02 +0200 Subject: [PATCH] Python 3 porting --- src/runtime/RuntimeSALOME.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/RuntimeSALOME.cxx b/src/runtime/RuntimeSALOME.cxx index d8f746fe5..753859e0e 100644 --- a/src/runtime/RuntimeSALOME.cxx +++ b/src/runtime/RuntimeSALOME.cxx @@ -324,7 +324,7 @@ void RuntimeSALOME::init(long flags, int argc, char* argv[]) if (PyDict_GetItemString(globals, "__builtins__") == NULL) { - PyObject *bimod = PyImport_ImportModule("__builtin__"); + PyObject *bimod = PyImport_ImportModule("builtins"); if (bimod == NULL || PyDict_SetItemString(globals, "__builtins__", bimod) != 0) Py_FatalError("can't add __builtins__ to __main__"); Py_DECREF(bimod); @@ -358,7 +358,7 @@ void RuntimeSALOME::init(long flags, int argc, char* argv[]) "from omniORB import CORBA\n" "from omniORB import any\n" "orb = CORBA.ORB_init([], CORBA.ORB_ID)\n" - "#print sys.getrefcount(orb)\n" + "#print(sys.getrefcount(orb))\n" "try:\n" " import SALOME\n" "except:\n" -- 2.30.2