Skip to content
Permalink
Browse files

fix #2512

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13013 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Mar 7, 2010
1 parent 5641f9a commit 8824da014332bfeed671e2ca59336ea3912a0ef2
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/python/qgspythonutilsimpl.cpp
@@ -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",

0 comments on commit 8824da0

Please sign in to comment.
You can’t perform that action at this time.