]> 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:30:40 +0000 (06:30 +0000)
committervsr <vsr@opencascade.com>
Fri, 28 Sep 2007 06:30:40 +0000 (06:30 +0000)
src/SalomeApp/SalomeApp_Application.cxx

index 3bb85faa3dc02eb88787ce22e79b9ff03ab77af1..dd79ee88150d189cd7c77992f69fef5e1be82830 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 );
               }
             }