Преглед на файлове

Import python's site module for local config

For example, on debian/ubuntu, the site module
defines that dist-packages from easy_install
are located in /usr/local/lib/pythonX.Y rather
than in /usr/lib/pythonX.Y where all the other
python files are installed.
Steve Pieper преди 13 години
родител
ревизия
610e80693a
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      Libs/Scripting/Python/Core/ctkAbstractPythonManager.cpp

+ 2 - 0
Libs/Scripting/Python/Core/ctkAbstractPythonManager.cpp

@@ -100,6 +100,8 @@ void ctkAbstractPythonManager::initPythonQt()
     initCode << QString("sys.path.append('%1')").arg(QDir::fromNativeSeparators(path));
     }
 
+  initCode << QString("import site");
+
   _mainContext.evalScript(initCode.join("\n"));
 
   this->preInitialization();