[GRASSGUI] python scripting support?

Michael Barton michael.barton at asu.edu
Mon Apr 9 10:06:55 EDT 2007


Any idea what would be the python equivalent of the bash lines...

if [ "$1" != "@ARGS_PARSED@" ] ; then
  exec g.parser "$0" "$@"
fi

Michael

On 4/8/07 4:33 AM, "Glynn Clements" <glynn at gclements.plus.com> wrote:

> 
> Michael Barton wrote:
> 
>> What would it take to support python scripts like we support bash scripts.
>> That is, can we have a python script header that is automatically read and
>> parsed by menuform.py in some structured way to create a nice wxPython GUI
>> for ad hoc scripts? This could encourage people to start scripting
>> interesting things in Python, as well as porting existing scripts to Python.
> 
> g.parser can be used with any language which supports '#' as a comment
> character. See general/g.parser/test.py for an example Python script
> which uses g.parser.
> 
> The Python GUI can run such scripts with --interface-description to
> get module/option/flag information in XML, from which a GUI could be
> generated.

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

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





More information about the grass-gui mailing list