Skip to content

Commit

Permalink
fix python problem for windows installer
Browse files Browse the repository at this point in the history
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 7ad7bc3
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 7ad7bc3

Please sign in to comment.