[QGIS Commit] r13013 - trunk/qgis/src/python
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Mar 7 11:19:35 EST 2010
Author: jef
Date: 2010-03-07 11:19:34 -0500 (Sun, 07 Mar 2010)
New Revision: 13013
Modified:
trunk/qgis/src/python/qgspythonutilsimpl.cpp
Log:
fix #2512
Modified: trunk/qgis/src/python/qgspythonutilsimpl.cpp
===================================================================
--- trunk/qgis/src/python/qgspythonutilsimpl.cpp 2010-03-06 16:10:32 UTC (rev 13012)
+++ trunk/qgis/src/python/qgspythonutilsimpl.cpp 2010-03-07 16:19:34 UTC (rev 13013)
@@ -56,10 +56,11 @@
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",
More information about the QGIS-commit
mailing list