Salome HOME
Better adding extra paths to the end of list
authorvsr <vsr@opencascade.com>
Wed, 13 Apr 2022 16:39:28 +0000 (19:39 +0300)
committervsr <vsr@opencascade.com>
Wed, 13 Apr 2022 16:39:28 +0000 (19:39 +0300)
src/SalomeApp/SalomeApp_PyInterp.cxx

index ede9f290bc9667d1919bc088e0bc9a3750c9518a..48fb77249aa97fc825101d9cf42b2e5cc7e6ca24 100644 (file)
@@ -67,9 +67,8 @@ int SalomeApp_PyInterp::beforeRun()
     QStringList parameters = myResourceMgr->parameters( "pythonpath" );
     foreach ( QString parameter, parameters ) {
       QStringList paths = myResourceMgr->stringValue( "pythonpath", parameter ).split( ";;" );
-      int index = 0;
       foreach( QString path, paths )
-        simpleRun( QString( "import sys; sys.path.insert(%1, '%2')" ).arg( index++ ).arg( path ).toUtf8().constData(), false );
+        simpleRun( QString( "import sys; sys.path.append('%1')" ).arg( path ).toUtf8().constData(), false );
     }
     int ret = simpleRun( "from Help import *", false );
     if ( ret )