[GRASS-user] Error using grass.Popen

Markus Neteler neteler at osgeo.org
Thu Mar 31 17:20:02 EDT 2011

2011/3/31 António Rocha <antonio.rocha at deimos.com.pt>:
> Greetings
> I'm using grass.Popen like this:
> externalProcess = grass.Popen(cmd, stdout=grass.PIPE, stderr=grass.PIPE,
> cwd=tempfile)           It seems that I'm getting some error while running
> this function but the only thing that is printed in my command Output window
> is:
> <grass.script.core.Popen object at 0x00D6ECD0>
> How can I get the exact error that I'mgetting?

Unfortunately I don't know. But what kind of "cmd" are you running?
I read
"[To be precise, they use grass.Popen(), which just calls
subprocess.Popen() with shell=True on Windows and shell=False
otherwise. On Windows, you need to use shell=True to be able to
execute scripts (including batch files); shell=False only works with
binary executables.]"

Maybe giving you some idea?


More information about the grass-user mailing list