[GRASS-dev] Re: diff to start wingrass with GUI + com.exe terminal [was: Re: [winGRASS] (no subject)]

Michael Barton michael.barton at asu.edu
Tue May 22 11:04:55 EDT 2007

On 5/22/07 12:35 AM, "Hamish" <hamish_nospam at yahoo.com> wrote:

> Paul Kelly wrote:
>> (2) to just launch gis.m and block while waiting for the user to
>> exit using File-->Exit
> hack:
> remove the "&" in the gis.m script (or unset BG_GUI="&" and put $BG_GUI
> at the end of the exec "$GRASS_WISH" lines).
> Then start gis.m with "exec gis.m" and minimize/hide the cmd window
> somehow.
> I don't like the idea much of trying to reinvent a Full terminal prompt.
> Seems to me we could spend a lot of time on that to recreate what
> already exists, poorly. Keep it simple or use something already written.

Agreed. Or improve on what is already there in simple ways.

> Having said that, the GRASS terminal prompt from QGIS's GRASS toolbox
> looks quite nice.
> Glynn:
>> Personally, I would favour switching to Python.
> If we forget about MSys C:/> path pain for a minute, and assume the
> GRASS terminal will not be exposed to the user by default, does it
> really matter if the backend interpreter to a script is Python or some
> flavour of sh?
> Is a full python interpreter needed for the wxPython GUI? (so we can
> rely on python already being there?)

AFAICT, you need full Python (or at least a runtime version) to use
wxPython. So assuming that we continue down this road, Python in some form
will become a dependency of the GUI at least.

> Tcl/Tk is still optional. With Python replacing sh for housekeeping
> scripts, Python would become mandatory.
> If we require Python to be installed, can the compiled SWIG library be
> used without additional dependencies? (ie is the swig package only
> needed at compile time?) Access to libgis fns opens up other doors.
>>>> import python_grass6
>>>> path=python_grass6.G_gisbase()
>>>> python_grass6.G_convert_dirseps_to_host(path)

This is a fairly big decision I guess. But having worked with Python now for
9 months, it is one that I favor too. It is not an onerous dependency and
one that makes for much more flexible scripting plus real cross-platform


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-dev mailing list