Skip to content

Commit

Permalink
fix #2512
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13013 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 7, 2010
1 parent 5641f9a commit 8824da0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/python/qgspythonutilsimpl.cpp
Expand Up @@ -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",
Expand Down

0 comments on commit 8824da0

Please sign in to comment.