From fcc31ca09149ccb54860899e32fbe7ca668acd1f Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 21 Jan 2021 13:58:21 +0300 Subject: [PATCH] bos #20588 EDF 22731 - python command of load script --- src/SalomeApp/SalomeApp_Application.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index b5a6c6a54..bfb209efa 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -1000,7 +1000,7 @@ void SalomeApp_Application::onLoadScript( ) if ( !aFile.isEmpty() ) { - QString command = QString("exec(open(\"%1\", \"rb\").read())").arg(aFile); + QString command = QString("exec(compile(open('%1', 'rb').read(), '%1', 'exec'))").arg(aFile); #ifndef DISABLE_PYCONSOLE PyConsole_Console* pyConsole = pythonConsole(); -- 2.39.2