From: adam Date: Wed, 25 Feb 2009 10:10:25 +0000 (+0000) Subject: On windows, there are back slash in file names X-Git-Tag: V5_1_1a2~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f409715397120c949eb64ecce526738b9193c648;p=modules%2Fgui.git On windows, there are back slash in file names thus we need to protect the string with a "r" in order that python don't interpret it ... --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 2c66cbdd7..fe88f05d4 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -205,7 +205,7 @@ void SalomeApp_Application::start() QString extension = fi.suffix().toLower(); if ( fi.exists() ) { // execute python script - QString command = QString( "execfile(\"%1\")" ).arg( fi.absoluteFilePath() ); + QString command = QString( "execfile(r\"%1\")" ).arg( fi.absoluteFilePath() ); pyConsole->exec( command ); } else { @@ -765,7 +765,7 @@ void SalomeApp_Application::onLoadScript( ) if ( !aFile.isEmpty() ) { - QString command = QString("execfile(\"%1\")").arg(aFile); + QString command = QString("execfile(r\"%1\")").arg(aFile); PyConsole_Console* pyConsole = pythonConsole();