[GRASS-dev] Shell scripts

Michael Barton Michael.Barton at asu.edu
Mon Nov 30 15:17:59 EST 2009


If you take a look at histogram.py, this gives some idea of what it  
takes to create a module that renders in wxPython canvas. You can  
eliminate the code for drawing the histogram window and tool bar, of  
course, but there is still quite a bit of coding to do to run d.hist  
and have the results rendered in the canvas.

Something along this line could potentially be written to make it  
possible to display something in the canvas by typing a command of  
some sort from the terminal. But I was wondering if it would be  
simpler to display maps in another way for those who want to work in  
this way.

Also, did you know that you can type a d.vect or d.rast in the  
wxPython command console to add a map layer? Maybe a better way to go  
is to improve the wxPython command console with history, etc. than to  
create a separate interface.

Michael


On Nov 27, 2009, at 12:33 AM, Markus Neteler wrote:

> On Fri, Nov 27, 2009 at 2:56 AM, Glynn Clements
> <glynn at gclements.plus.com> wrote:
>> Michael Barton wrote:
>>
>>>> If you want to be able to control the GUI from the command line,  
>>>> that
>>>> should be dealt with as an infrastructure issue, not by creating
>>>> wrappers around individual commands.
>>>>
>>>> I can deal with the display/driver libraries, and with generic  
>>>> Python
>>>> IPC, but some of it will need the involvement of someone who
>>>> understands the GUI.
>>>
>>> Winter break is near and I'll be laid up for a week. So I might be
>>> able to help.
>>>
>>> Controlling the GUI from the command line is a contradiction in
>>> interface terms. Perhaps you really mean displaying a map from the
>>> command line?
>>
>> I mean controlling the GUI, i.e. being able to modify the list of
>> displayed maps. That's what the p.* scripts appear to be doing.
>
> Yes, like what the d.* commands did with x0 etc.
> I regularly enjoy the beauty of shell history which I would
> not have using the (pure) GUI since clicks aren't registered.
>
> Markus



More information about the grass-dev mailing list