[GRASS-dev] Re: [GRASS GIS] #1310: Browse button in WxPython GUIs (for scripts) does not provide a correct file path for WinGRAS

GRASS GIS trac at osgeo.org
Sat Mar 26 13:40:58 EDT 2011


#1310: Browse button in WxPython GUIs (for scripts) does not provide a correct
file path for WinGRAS
------------------------------+---------------------------------------------
 Reporter:  katrineggert1980  |       Owner:  grass-dev@…              
     Type:  defect            |      Status:  new                      
 Priority:  critical          |   Milestone:  6.4.1                    
Component:  wxGUI             |     Version:  6.4.1 RCs                
 Keywords:  winGRASS          |    Platform:  MSWindows XP             
      Cpu:  Unspecified       |  
------------------------------+---------------------------------------------

Comment(by neteler):

 Replying to [comment:5 hellik]:
 > {{{
 > # if no output filename, output to stdout
 > if  [ -z "$GIS_OPT_OUTPUT" ] || [ "$GIS_OPT_OUTPUT" = "-" ]; then
 >     r.stats -1gn "$GIS_OPT_INPUT" fs="$GIS_OPT_FS"
 > else
 >     r.stats -1gn "$GIS_OPT_INPUT" fs="$GIS_OPT_FS" >
 output="$GIS_OPT_OUTPUT"
 > fi
 > }}}

 > '''but''' the file doesn't seem to be written, the destination folder is
 empty.

 Yes, you forgot to take out ">". Try this code:
 {{{
 # if no output filename, output to stdout
 if  [ -z "$GIS_OPT_OUTPUT" ] || [ "$GIS_OPT_OUTPUT" = "-" ]; then
     r.stats -1gn "$GIS_OPT_INPUT" fs="$GIS_OPT_FS" output="-"
 else
     r.stats -1gn "$GIS_OPT_INPUT" fs="$GIS_OPT_FS"
 output="$GIS_OPT_OUTPUT"
 fi
 }}}

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



More information about the grass-dev mailing list