[GRASS-dev] gis.m error for i.points (guarantee_xmon exec as string not list?)

Glynn Clements glynn at gclements.plus.com
Fri Jul 21 07:55:30 EDT 2006


Michael Barton wrote:

> This was difficult to track down, but I got it. Glynn updated grass-run.sh
> by adding "" around an expression parser and I removed 'eval' from an
> expression parser (term procedure) for modules requiring an xterm in
> runandoutput.tcl.
> 
> Doing one or the other of these was good. Doing both was a gotcha. Since the
> term procedure is much more limited in effects (and I pretty much can tell
> what is is affecting, I reverted term back to using eval. It all seems to
> work OK now.

However, this:

	eval exec -- xterm -name xterm-grass -e $env(GISBASE)/etc/grass-run.sh $cmd $args &

should be:

	eval [list exec -- xterm -name xterm-grass -e $env(GISBASE)/etc/grass-run.sh $cmd] $args &

The difference is that the latter will work correctly if there are
spaces in either $env(GISBASE) or $cmd, while the former won't.

The "eval" function treats all of its arguments as lists. If any of
them aren't lists and could contain spaces, they must be turned into
lists using the "list" function.

On Windows, it should be possible for GRASS (as well as any commands
which it uses and any files which it reads) to reside in either the
"Program Files" directory or the user's "My Documents" directory, both
of which may (and often will) contain spaces.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list