Skip to content
Permalink
Browse files

additional fix for #1173, missing PYTHON path

git-svn-id: http://svn.osgeo.org/qgis/trunk@10814 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek
rblazek committed May 18, 2009
1 parent 721adcb commit 5c1f3f8d184b870f106903ae12dcfe612b6ea077
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/providers/grass/qgsgrass.cpp
@@ -205,6 +205,15 @@ void GRASS_EXPORT QgsGrass::init( void )
strcpy( pathEnvChar, path.toAscii().constData() );
putenv( pathEnvChar );

// Set PYTHONPATH
QString pythonpath = "PYTHONPATH=" + gisBase + "/etc/python";
QString pp = getenv( "PATH" );
pythonpath.append( sep + pp );
QgsDebugMsg( QString( "set PYTHONPATH: %1" ).arg( pythonpath ) );
char *pythonpathEnvChar = new char[pythonpath.length()+1];
strcpy( pythonpathEnvChar, pythonpath.toAscii().constData() );
putenv( pythonpathEnvChar );

// Set GRASS_PAGER if not set, it is necessary for some
// modules printing to terminal, e.g. g.list
// We use 'cat' because 'more' is not present in MSYS (Win)

0 comments on commit 5c1f3f8

Please sign in to comment.
You can’t perform that action at this time.