]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
On windows, there are back slash in file names
authoradam <adam>
Wed, 25 Feb 2009 10:10:25 +0000 (10:10 +0000)
committeradam <adam>
Wed, 25 Feb 2009 10:10:25 +0000 (10:10 +0000)
thus we need to protect the string with a "r"
in order that python don't interpret it ...

src/SalomeApp/SalomeApp_Application.cxx

index 2c66cbdd71240e1ab49431ff7a4cfaf214c34239..fe88f05d421a5705b94fd3de842b2d6cb8213675 100644 (file)
@@ -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();