We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3f1137 commit f0f6c17Copy full SHA for f0f6c17
src/providers/grass/qgsgrass.cpp
@@ -205,6 +205,15 @@ void GRASS_EXPORT QgsGrass::init( void )
205
strcpy( pathEnvChar, path.toAscii().constData() );
206
putenv( pathEnvChar );
207
208
+ // Set PYTHONPATH
209
+ QString pythonpath = "PYTHONPATH=" + gisBase + "/etc/python";
210
+ QString pp = getenv( "PATH" );
211
+ pythonpath.append( sep + pp );
212
+ QgsDebugMsg( QString( "set PYTHONPATH: %1" ).arg( pythonpath ) );
213
+ char *pythonpathEnvChar = new char[pythonpath.length()+1];
214
+ strcpy( pythonpathEnvChar, pythonpath.toAscii().constData() );
215
+ putenv( pythonpathEnvChar );
216
+
217
// Set GRASS_PAGER if not set, it is necessary for some
218
// modules printing to terminal, e.g. g.list
219
// We use 'cat' because 'more' is not present in MSYS (Win)
0 commit comments