[GRASSLIST:7689] Re: Interactive GUI input/output

Glynn Clements glynn at gclements.plus.com
Fri Jul 22 22:43:40 EDT 2005


Dave Sampson wrote:

> Is it possible for the output area to be a small terminal-like area that 
> can choose to accept input. That way also you can use the GUI to HELP 
> contruct your command line but if needed an extra switch or option can 
> be thrown in (or even a pipe).

Not easily.

Tcl doesn't provide any means to create a pty, which means that you
could only provide a crude approximation of a terminal (in particular,
if the program checks whether stdin is a terminal with isatty(), it
will conclude that stdin isn't a terminal).

Using a pipe might be adequate for simple cases, although someone
would still need to write the code to allow the user to provide input
(a separate text field would be easier than allowing input in the
output text area) and pass it to the process.

Personally, I'd rather modules which are supposed to be
non-interactive (e.g. r.in.gdal) were fixed so that they really were
non-interactive. The pervasive assumption that a module can fall back
to communicating with the user via a terminal is the biggest issue
standing in the way of a decent GUI for GRASS.

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




More information about the grass-user mailing list