mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
fix #2512
git-svn-id: http://svn.osgeo.org/qgis/trunk@13013 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
0bc387060b
commit
3e339396a1
@ -56,10 +56,11 @@ void QgsPythonUtilsImpl::initPython( QgisInterface* interface )
|
||||
mMainDict = PyModule_GetDict( mMainModule ); // borrowed reference
|
||||
|
||||
runString( "import sys" ); // import sys module (for display / exception hooks)
|
||||
runString( "import os" ); // import os module (for user paths)
|
||||
|
||||
// expect that bindings are installed locally, so add the path to modules
|
||||
// also add path to plugins
|
||||
runString( "sys.path = [\"" + pythonPath() + "\", \"" + homePythonPath() + "\", \"" + homePluginsPath() + "\", \"" + pluginsPath() + "\"] + sys.path" );
|
||||
runString( "sys.path = [\"" + pythonPath() + "\", os.path.expanduser(\"~/.qgis/python\"), os.path.expanduser(\"~/.qgis/python/plugins\"), \"" + pluginsPath() + "\" ] + sys.path" );
|
||||
|
||||
// import SIP
|
||||
if ( !runString( "from sip import wrapinstance, unwrapinstance",
|
||||
|
Loading…
x
Reference in New Issue
Block a user