From 3e339396a186a19da6b19eac05722697a4e3c627 Mon Sep 17 00:00:00 2001 From: jef Date: Sun, 7 Mar 2010 16:19:34 +0000 Subject: [PATCH] fix #2512 git-svn-id: http://svn.osgeo.org/qgis/trunk@13013 c8812cc2-4d05-0410-92ff-de0c093fc19c --- src/python/qgspythonutilsimpl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/python/qgspythonutilsimpl.cpp b/src/python/qgspythonutilsimpl.cpp index ddda37b7492..fcf586f525d 100644 --- a/src/python/qgspythonutilsimpl.cpp +++ b/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",