[GRASS-dev] Re: g.rename consolidation

Maciej Sieczka tutey at o2.pl
Wed Feb 28 18:05:12 EST 2007


Glynn Clements wrote:
> Maciej Sieczka wrote:
> 
>> Michael Barton wrote:
>>> TclTk has a nice progress bar capabilities. But it needs consistent
>>> information to read. There is a progress bar built into the map display that
>>> tracks display progress. For modules that output consistent progress
>>> information, there is the green progress bar in the autogenerated dialog.
>>> The holes are for modules that don't output progress information in a
>>> consistent format and for scripts that tend not to output it at all.
>> Is it possible to make the script output progress info in way tcl/tk
>> GRASS GUI could use it?

> 	if [ "$GRASS_MESSAGE_FORMAT" = "gui" ] ; then
> 		echo "GRASS_INFO_PERCENT: $percent" >&2
> 	fi

Thank you (I couldn't find this GRASS_INFO_PERCENT documented in
variables.html).

> It could get tricky if the script calls modules which output their own
> percentages.
> 
> I suppose that the script *could* process the commands' stderr, parse
> the percentages and re-emit them to its own stderr, scaled according
> to the proportion of the task that the command represents. Although,
> I'm not expecting to see many scripts actually taking that approach.

Just one (I hope ;) ) question more: could I somehow disable module's
progress output alone, still letting it print it's ERRORs, ie. not
sending both it's sdout and stderr to /dev/null?

Maciek




More information about the grass-dev mailing list