Skip to content

Commit

Permalink
apply changeset r8811 to trunk
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8817 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Jul 19, 2008
1 parent c221c45 commit f8979a1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/python/qgspythonutilsimpl.cpp
Expand Up @@ -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.")))
Expand Down

0 comments on commit f8979a1

Please sign in to comment.