[GRASS-dev] Updates to gism.py - autogenerated gui for all commands.

Michael Barton michael.barton at asu.edu
Mon Aug 7 13:18:43 EDT 2006


I just uploaded a new version of gism.py and related files. I'll keep an
archive and so changed the link in the GRASS WIKI (development/python
section) to go to the folder rather than the file itself so I won't have to
keep changing the link. This update includes the following changes:

*The biggest change in wrapping in grassgui.py. This provides autogenerated
wxPython GUI dialogs for all grass commands.
This can now be called from the command console (just type in the command
name with no arguments as you do now) or the
prototype menus. I updated grassgui.py to current wxPython syntax (mostly ­
event bindings need to change to new Bind method) and added methods to make
it callable from other modules. I also added scroll bars. We need to add
buttons (and relevant module or method like select.tcl) to browse GRASS
Œelements¹ (i.e., rasters, vectors, files, etc.). Thanks very much to Yann
Chemin for showing that grassgui.py worked.

*Methods added to gism.py and grassgui.py that automatically restart them
with pythonw for the Mac.

*Change to subprocess module for running commands in the shell--seems to
have stopped the double dialog boxes.

Important things to do. I¹d like to start thinking about moving this to the
cvs so that we can work on it collaboratively in a more controlled way. It
should go into the grass6/gui/wxpython folder in the cvs. In the compiled
binary, I¹m guessing that it should end up in its own directory (e.g., wxp
or gmwxp) like gm and dm. But I have a BIG PROBLEM. I can¹t get gism.py to
run from another directory, even though python is in my path and runs fine.
That is, when in my home directory, if I try to run...

> pythonw $GISBASE/etc/wxp/gism.py

...my Mac crashes with a bus error‹even though $GISBASE has a value and even
when I expand it to type out the full path. I¹ve tried setting $PYTHONPATH
(i.e., for module search path) and it makes no difference. I don¹t know
whether this is a Mac problem, something weird with my system, or something
I don¹t know about  yet with Python. Anyone have any thoughts?

If this were fixed, we could easily make a script (e.g., gismpy) that could
launch it from the GRASS command prompt.

I can¹t yet get d.* commands to work from the new autodialogs, but they work
from the command line. It¹s a parameter passing issue. Other commands seem
to work fine.

I think we¹re ready to do the layer manager, layer options panels, and menu
or toolbox.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20060807/a3bef944/attachment.html


More information about the grass-dev mailing list