[GRASSGUI] Re: RENDERING SOLVED!!!!
William Kyngesburye
woklist at kyngchaos.com
Tue Mar 20 14:54:43 EDT 2007
On Mar 20, 2007, at 1:43 PM, Jachym Cepicky wrote:
> Hi,
>
>> If possible, commands should be lists of strings rather than strings.
>> This will start to matter if we have commands where option values can
>> contain spaces or other shell metacharacters.
>>
>> IOW, os.spawnv() should be used in preference to os.system().
>>
>
> AFAIK os.system is really deprecated. How ever, I do not understand,
> if os.spawn should be the best.
>
> http://docs.python.org/lib/node538.html
>
> suggests to use Popen from the subprocess package.
>
> this is, what we have in the compat folder in Gism, because it does
> not work for python <=2.3
>
> I sugget to use subprocess.Popen on this place
>
> jachym
>
FWIW, when I played with my OSX GRASS.app using a python wrapper
(it's now started from AppleScript), I could only get os.spawnv to
work right. Though I only tried spawn* and exec*, not system or popen.
-----
William Kyngesburye <kyngchaos at kyngchaos.com>
http://www.kyngchaos.com/
Theory of the Universe
There is a theory which states that if ever anyone discovers exactly
what the universe is for and why it is here, it will instantly
disappear and be replaced by something even more bizarrely
inexplicable. There is another theory which states that this has
already happened.
-Hitchhiker's Guide to the Galaxy 2nd season intro
More information about the grass-gui
mailing list