Skip to content
Permalink
Browse files
fix python problem for windows installer
git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_11_0@8811 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Jul 17, 2008
1 parent 72316fa commit 7ad7bc34b0e0d2c2b3d852104bfc3d9fa371d337
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/python/qgspythonutilsimpl.cpp
@@ -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.")))

0 comments on commit 7ad7bc3

Please sign in to comment.