Skip to content

Commit 3e33939

Browse files
author
jef
committed
fix #2512
git-svn-id: http://svn.osgeo.org/qgis/trunk@13013 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 0bc3870 commit 3e33939

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/python/qgspythonutilsimpl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ void QgsPythonUtilsImpl::initPython( QgisInterface* interface )
5656
mMainDict = PyModule_GetDict( mMainModule ); // borrowed reference
5757

5858
runString( "import sys" ); // import sys module (for display / exception hooks)
59+
runString( "import os" ); // import os module (for user paths)
5960

6061
// expect that bindings are installed locally, so add the path to modules
6162
// also add path to plugins
62-
runString( "sys.path = [\"" + pythonPath() + "\", \"" + homePythonPath() + "\", \"" + homePluginsPath() + "\", \"" + pluginsPath() + "\"] + sys.path" );
63+
runString( "sys.path = [\"" + pythonPath() + "\", os.path.expanduser(\"~/.qgis/python\"), os.path.expanduser(\"~/.qgis/python/plugins\"), \"" + pluginsPath() + "\" ] + sys.path" );
6364

6465
// import SIP
6566
if ( !runString( "from sip import wrapinstance, unwrapinstance",

0 commit comments

Comments
 (0)