[GRASS-dev] Shell scripts

Michael Barton Michael.Barton at asu.edu
Tue Dec 1 22:42:41 EST 2009


Attached is a diff that shows how this could be done. It allows you to  
type a command on the output console, hit return, and have the command  
run. You can type display commands like d.rast map=elevation.dem and  
have the map display in the canvas if you have auto-rendering turned on.

As Martin says, this functionality is already in the command entry  
windows. I just shifted it to the output console too. There are a  
couple of items that would need to be cleaned up -- hitting return in  
the middle of a line sends it as a command but also breaks the line.  
Also, commands entered in this way get echoed twice. But this is just  
a preliminary example. It should not change any other functionality  
except for permitting commands to be run from within the output console.

It should be applied to develbranch_6.

I'm not certain that I made the diff correctly (svn diff > file),  
however. So you might want to look at it first, and try this on a copy.

Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: console_example.diff
Type: application/octet-stream
Size: 1678 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20091201/036be455/console_example.obj
-------------- next part --------------



On Dec 1, 2009, at 5:54 AM, Martin Landa wrote:

> Hi,
>
> 2009/12/1 Michael Barton <Michael.Barton at asu.edu>:
>
> [...]
>
>> On the other hand, if these folks DO want to use the wxPython GUI  
>> (and all
>> the interactive tools on the canvas) but simply want to be able to  
>> get maps
>> displayed in the canvas by typing commands instead of adding them  
>> to the
>> layer manager, then I think the better way to go is to enhance the  
>> wxPython
>> console. This solution could be of interest to power users on all  
>> platforms.
>
> It already works, try to type in wxGUI prompt, e.g. `d.rast
> map=elevation.dem`. Anyway I think that something like `d.mon wx0`
> would be usable.
>
> Martin
>
> -- 
> Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa



More information about the grass-dev mailing list