]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix small problem with --execute command line option for runSalome script: the .py...
authorvsr <vsr@opencascade.com>
Fri, 28 Sep 2007 06:31:32 +0000 (06:31 +0000)
committervsr <vsr@opencascade.com>
Fri, 28 Sep 2007 06:31:32 +0000 (06:31 +0000)
src/SalomeApp/SalomeApp_Application.cxx

index 93f1e10aad65c69d88fa12d79caced34cc12dfa3..3e019b7f6e8b5a4690167435ef2a6a0b8237e661 100644 (file)
@@ -196,7 +196,7 @@ void SalomeApp_Application::start()
            PythonConsole* pyConsole = pythonConsole();
            if ( pyConsole ) {
               QString extension = fi.extension( false ).lower();
-              if ( extension == "py" && fi.exists() ) {
+              if ( fi.exists() ) {
                 // execute python script
                 QString command = QString( "execfile(\"%1\")" ).arg( fi.absFilePath() );
                 pyConsole->exec( command );
@@ -204,7 +204,8 @@ void SalomeApp_Application::start()
               else {
                 // import python module
                 QString command = QString( "import %1" ).arg( pyfiles[j] );
-                //QString command = QString( "import %1" ).arg( fi.baseName( true ) );
+               if ( extension == "py" )
+                 command = QString( "import %1" ).arg( fi.baseName( true ) );
                 pyConsole->exec( command );
               }
             }