Skip to content

Commit 7ad7bc3

Browse files
author
jef
committed
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
1 parent 72316fa commit 7ad7bc3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/python/qgspythonutilsimpl.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,14 @@ void QgsPythonUtilsImpl::initPython(QgisInterface* interface)
5151
mMainDict = PyModule_GetDict(mMainModule); // borrowed reference
5252

5353
runString("import sys"); // import sys module (for display / exception hooks)
54-
runString("import traceback"); // for formatting stack traces
55-
runString("import __main__"); // to access explicitly global variables
56-
54+
5755
// expect that bindings are installed locally, so add the path to modules
5856
// also add path to plugins
5957
runString("sys.path = [\"" + pythonPath() + "\", \"" + homePluginsPath() + "\", \"" + pluginsPath() + "\"] + sys.path");
6058

59+
runString("import traceback"); // for formatting stack traces
60+
runString("import __main__"); // to access explicitly global variables
61+
6162
// import SIP
6263
if (!runString("from sip import wrapinstance, unwrapinstance",
6364
QObject::tr("Couldn't load SIP module.") + "\n" + QObject::tr("Python support will be disabled.")))

0 commit comments

Comments
 (0)