[GRASS-dev] [GRASS GIS] #1280: problem about the output of g.parser

#1280: problem about the output of g.parser
---------------------------------------+------------------------------------
Reporter: met | Owner: grass-dev@…
     Type: defect | Status: new
Priority: minor | Milestone: 6.4.1
Component: Default | Version: 6.4.1 RCs
Keywords: g.parser output character | Platform: MSWindows XP
      Cpu: OSX/Intel |
---------------------------------------+------------------------------------
Into the output of command g.parser are eliminated all character slash \
while are keeping unotuched characters like / .

== GRASS 6.4.1RC1 (sanmarino)> test.parser
inp_file=D:\Modelli\nepaPy\Net3.inp
   '@ARGS_PARSED@\nopt_inp_file=D:ModellinepaPyNet3.inp\n'
   'opt_inp_file=D:ModellinepaPyNet3.inp'
   {'inp_file': 'D:ModellinepaPyNet3.inp'} ==

== GRASS 6.4.1RC1 (sanmarino)> test.parser
inp_file=D:/Modelli/nepaPy/Net3.inp
   '@ARGS_PARSED@\nopt_inp_file=D:/Modelli/nepaPy/Net3.inp\n'
   'opt_inp_file=D:/Modelli/nepaPy/Net3.inp'
   {'inp_file': 'D:/Modelli/nepaPy/Net3.inp'} ==

The problem come from by the Wxguy (under windows) that give back the
pathname using the wrong slash \.

Using commandline this problem can be solved putting the path name between
apexes " .

== GRASS 6.4.1RC1 (sanmarino)> test.parser
inp_file="D:\Modelli\epaPy\Net3.inp"
   'opt_inp_file=D:\\Modelli\\epaPy\\Net3.inp'
   {'inp_file': 'D:\\Modelli\\epaPy\\Net3.inp'} ==

Using the Guy insetad, that trick doesn't work.

== (Wed Feb 16 16:36:04 2011)
test.parser inp_file="C:\Programmi\GRASS-64\msys\m.ico"
   '@ARGS_PARSED@\nopt_inp_file="C:ProgrammiGRASS-64msysm.ico"\n'
   'opt_inp_file="C:ProgrammiGRASS-64msysm.ico"'
   ({'inp_file': '"C:ProgrammiGRASS-64msysm.ico"'}, {})
   (Wed Feb 16 16:36:05 2011) Command finished (0 sec)

Again with the graphic guy, we can avoid this problem if the pathname has
blank ( even adding one blank at the end of file name)

== (Wed Feb 16 16:31:52 2011)
   test.parser inp_file=C:\Programmi\GRASS-64\msys\m.ico
   '@ARGS_PARSED@\nopt_inp_file=C:\\Programmi\\GRASS-64\\msys\\m.ico \n'
   'opt_inp_file=C:\\Programmi\\GRASS-64\\msys\\m.ico '
   ({'inp_file': 'C:\\Programmi\\GRASS-64\\msys\\m.ico '}, {})
   (Wed Feb 16 16:31:52 2011) Command finished (0 sec) ==

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1280&gt;
GRASS GIS <http://grass.osgeo.org>

#1280: problem about the output of g.parser
--------------------------------+-------------------------------------------
Reporter: met | Owner: grass-dev@…
     Type: defect | Status: new
Priority: minor | Milestone: 6.4.1
Component: Default | Version: 6.4.1 RCs
Keywords: wingrass, g.parser | Platform: MSWindows XP
      Cpu: OSX/Intel |
--------------------------------+-------------------------------------------
Changes (by hellik):

  * keywords: g.parser output character => wingrass, g.parser

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1280#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1280: problem about the output of g.parser
--------------------------------+-------------------------------------------
Reporter: met | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.1
Component: Default | Version: 6.4.1 RCs
Keywords: wingrass, g.parser | Platform: MSWindows XP
      Cpu: All |
--------------------------------+-------------------------------------------
Changes (by benducke):

  * priority: minor => major
  * cpu: OSX/Intel => All

Comment:

This bug also creates havoc for shell scripts running under Windows. E.g.
I have a script that takes a file name as an output (option defined with:
"gisprompt: new_file,file,output"). If the user inputs something like
this: "C:\Documents\Output.tif" as option value, then g.parser mangles it
to: "C:DocumentsOutput.tif". I have tested this on Windows XP with GRASS
6.4.0RC6. But given that this ticket is still open, I assume that the bug
is still around, too? If so, it needs to be fixed, as it could put a
number of scripts out-of-order under Windows.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1280#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1280: problem about the output of g.parser
---------------------------+------------------------------------------------
  Reporter: met | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.1
Component: Default | Version: 6.4.1 RCs
Resolution: duplicate | Keywords: wingrass, g.parser
  Platform: MSWindows XP | Cpu: All
---------------------------+------------------------------------------------
Changes (by hamish):

  * status: new => closed
  * resolution: => duplicate

Comment:

continued in #1198

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1280#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>