[GRASS-dev] Re: [GRASS GIS] #528: wxGUI cmd: r.mapcalc fails
GRASS GIS
trac at osgeo.org
Fri Mar 13 15:57:25 EDT 2009
#528: wxGUI cmd: r.mapcalc fails
-----------------------+----------------------------------------------------
Reporter: neteler | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by glynn):
Replying to [comment:7 cmbarton]:
> This seems more of an enhancement request than a defect.
The inability to have spaces within arguments is a defect, and a rather
fundamental one.
If the GUI doesn't need to understand the command(s), the string should be
passed verbatim to Popen(..., shell=True). But this will allow arbitrary
shell commands, including redirection, pipelines, for/if/while, etc.
If you need to parse a string into program and argv[], consider using
shlex.split():
http://docs.python.org/library/shlex.html
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/528#comment:9>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list