[GRASS-user] Re: Envoking GRASS in a python script

kungphil phil.wilkes at dse.vic.gov.au
Tue Oct 18 21:08:28 EDT 2011

Thanks for your help Glynn

I have now got it to work!

Just a couple of things, this...

os.environ['PATH'] = os.pathsep.join(os.environ['PATH'],bindir,scriptdir)

...should have [] around the arguments so as to make a list as the join
function can take only one argument, so it looks like this...

os.environ['PATH'] = os.pathsep.join([os.environ['PATH'],bindir,scriptdir])

And I had to set PYTHONPATH in my .bash_profile to get it to recognise the
grass module, not sure why.

Thanks again!

View this message in context: http://osgeo-org.1803224.n2.nabble.com/Envoking-GRASS-in-a-python-script-tp6903363p6906954.html
Sent from the Grass - Users mailing list archive at Nabble.com.

More information about the grass-user mailing list