[GRASS-dev] Re: [GRASS GIS] #528: wxGUI cmd: r.mapcalc fails

GRASS GIS trac at osgeo.org
Fri Mar 13 07:27:15 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                      
-----------------------+----------------------------------------------------
Changes (by glynn):

  * priority:  major => critical

Comment:

 Replying to [comment:5 neteler]:

 > > > Maybe the " chars are not protected?

 More likely, they aren't *interpreted*, e.g. something is splitting the
 command line into arguments, treating every spaces as a separator.

 > > yes, anyway it should without quotation marks

 Not in 7.0 it won't, nor will that work for e.g. title=... or filename
 arguments which need to accept strings containing spaces.

 > This would break compatibility to the common command line (hence, in all
 books, tutorials, courses etc this hint would be required which is rather
 cluttering stuff). If technically possible (and time permits) I hope that
 quotes can be maintained also in the wx-cmd line.

 If the GUI is to provide a command line, it needs to actually support the
 basic features of any command-line interface, e.g. the ability to have
 spaces, quotes etc within arguments.

 If it simply passing the command on to the OS, it should probably just
 pass shell=True to Popen() rather than trying to parse it itself. If it
 needs to know how the command is parsed, I suggest writing a small helper
 program which writes its argv[] to stdout, separated by NULs, then have
 the GUI invoke that program via the shell and parse its output.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/528#comment:6>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list