mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
apply changeset r8811 to trunk
git-svn-id: http://svn.osgeo.org/qgis/trunk@8817 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
92d74a6dd1
commit
9c3b2ca03d
@ -51,13 +51,14 @@ void QgsPythonUtilsImpl::initPython(QgisInterface* interface)
|
||||
mMainDict = PyModule_GetDict(mMainModule); // borrowed reference
|
||||
|
||||
runString("import sys"); // import sys module (for display / exception hooks)
|
||||
runString("import traceback"); // for formatting stack traces
|
||||
runString("import __main__"); // to access explicitly global variables
|
||||
|
||||
|
||||
// expect that bindings are installed locally, so add the path to modules
|
||||
// also add path to plugins
|
||||
runString("sys.path = [\"" + pythonPath() + "\", \"" + homePluginsPath() + "\", \"" + pluginsPath() + "\"] + sys.path");
|
||||
|
||||
runString("import traceback"); // for formatting stack traces
|
||||
runString("import __main__"); // to access explicitly global variables
|
||||
|
||||
// import SIP
|
||||
if (!runString("from sip import wrapinstance, unwrapinstance",
|
||||
QObject::tr("Couldn't load SIP module.") + "\n" + QObject::tr("Python support will be disabled.")))
|
||||
|
Loading…
x
Reference in New Issue
Block a user