[GRASS-dev] WxPython prototype GRASS GUI. Version 2

Building on Jachym¹s work and doing a personal Œsummer of code¹ since I¹m
not in the field for a change, I¹ve completed a 2nd version of a wxPython
GUI for GRASS 6.

It was developed and tested with wxPython 2.6.3 (ANSI version) and Python
2.4.3 (ActiveStates binary) for Mac OS X. The wxPython site is at
<http://wiki.wxpython.org/index.cgi/wxPython&gt; and has links to Python
downloads. Currently, the command line interface, display window, and
example menu items are functional. There is also a non-functional demo tree
control for GIS layers and notebook interface. I haven¹t yet done options
panels or their equivalents.

In the command console window, you can enter GRASS (or other) commands to be
parsed by the OS. Yes, you can even enter display commands and they will
magically create displays. You can chain together display commands,
separated by commas. For example, you can type...

d.rast elevation_dem, d.vect roads color=red

...to create a display of a DEM overlayed by a red road network from the
Spearfish60 demo data set. For some reason g.list bombs. But other commands
seem to work pretty well, and can also launch the current TclTk GUI dialogs.
You can open multiple display windows; the one on top and active (i.e.,
click it) is the one that will receive and process display commands from the
console.

Zoom in, zoom out, and pan controls are functional in the map display
window, though zooming is a bit ugly. A few demo menu items are included.
These could be redone as a toolbox, as several have suggested, using an icon
mode listcontrol. There is a simple treecontrol for layers. I haven't added
any icons. There is a nice custom treecontrol available that can have
checkboxes and other widgets that we might want to use.

Please give it a try and see what you think. It is especially important to
see if it runs well cross-platform. I'm sure there are bugs, and the error
trapping is minimal. I'm sure that the code could (and should) be
modularized and optimized more. However, it seems to do much of the basic UI
work that we need. While wxPython lacks a few items that we use in TclTk, it
has a number of other widgets or more sophisticated versions of widgets that
are lacking or underdeveloped in TclTk. Given that I knew ZERO Python in
May, to have come this far in a few months is a testament to the relative
ease of programming in this platform. I'm sold on it for GRASS UI
development because of its flexibility, versitility, power, and ease of
programming. For anyone interested, my references have been:

Rappin, Noel and Robin Dunn
    2006 wxPython in Action. Manning Publications, Greenwich, CT.

Hetland, Magnus
    2005 Beginning Python: from Novice to Professional.
Apress/Springer-Verlag, NY.

And the ActiveStates Python 2.4 documentation package.

I've used SPE (cross-platform, open source) as an integrated development.
environment (IDE) for coding.

After this has been evaluated a bit and (hopefully) works for everyone, the
next step could be to divide up the tasks of porting the GUI from TclTk to
wxPython, trying to follow the GUI roadmap. This is a very big job and could
use the coordinated work of several people. As we do that, and after we have
a relatively functional product, we can begin to implement some of the
updates, improvements, and wishes that can be better done more easily with
wxPython. If you are interested in helping but don't know Python or
wxPython, take heart. Even I could learn enough to do something useful in a
fairly short time.

If you want to download and try out gism.py, I made a section on the GRASS
WIKI for it in the development/python section and linked it to the tgz
package on my website for download. I also uploaded the tgz file to the
WIKI, but can't figure out how to link it to the text section I did (Can
someone advise me on this?)

Enjoy!

Michael
__________________________________________
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

Very cool.

I just knew once people took a look at Python they would get it. Sorry I haven’t been very active on this this summer. I got my PhD a couple of months ago and took a new job with the USGS. So I’ve been taking it easy this summer and playing with my daughter.

I’ve been teaching the GIS techs here how to use the Python interface for that other GIS (mumbles under breath) and I’ve been developing a new Python tool for working with our Sonar system. I really like the way ArcToolbox works conceptually (it still has bugs that drive me nuts, but…). I think that we should implement something similar in GRASS. It keeps the linkage between the GUI and the CLI strong without looking old fashioned and is very easy to extend in Python, C or whatever.

I’ll take a look at what you did tomorrow. Thanks for all the hard work on this.

Cheers,

David

Michael Barton wrote:

Building on Jachym¹s work and doing a personal Œsummer of code¹ since I¹m
not in the field for a change, I¹ve completed a 2nd version of a wxPython
GUI for GRASS 6.

Great job Michael !

Zoom in, zoom out, and pan controls are functional in the map display
window, though zooming is a bit ugly.

Yes, but it works.

Panning however causes problems for me:

- first the screen flashes very frequently while the map moves
- once the map is in its new position, I cannot use the mouse anymore, only my keyboard. However, when I change to another workspace of my Gnome desktop and then switch back again, the map display is empty, but I can use my mouse again.

A few demo menu items are included.

Here they also cause a funny behaviour: when I chose import (or export), I get the command window (which is still the tcltk one, or ?) in modal mode, i.e. the other windows are dead. When I then click on 'close' in the command window, it closes and then reopens immediately. When I close it a second time it closes and the other windows (gis manager and map display) become active again...

Please give it a try and see what you think. It is especially important to
see if it runs well cross-platform.

My tests are on Debian testing/unstable.

While wxPython lacks a few items that we use in TclTk,

such as ?

After this has been evaluated a bit and (hopefully) works for everyone, the
next step could be to divide up the tasks of porting the GUI from TclTk to
wxPython, trying to follow the GUI roadmap. This is a very big job and could
use the coordinated work of several people.

Even though my programming knowledge is limited (just as - obviously - my time), I am willing to help with this, at least in the form of testing, but maybe even some simple coding.

If you want to download and try out gism.py, I made a section on the GRASS
WIKI for it in the development/python section and linked it to the tgz
package on my website for download. I also uploaded the tgz file to the
WIKI, but can't figure out how to link it to the text section I did (Can
someone advise me on this?)

How about [[Media:FileName]] ?

Moritz

Hallo,
I report that it is working on Linux (Ubuntu 6.06) - nice work!

After this has been evaluated a bit and (hopefully) works for everyone, the
next step could be to divide up the tasks of porting the GUI from TclTk to
wxPython, trying to follow the GUI roadmap. This is a very big job and could
use the coordinated work of several people.

First step could be, implement Jan-Oliver's grassgui.py script
(grass6/gui/wxpython) :slight_smile: should be pretty easy.

As we do that, and after we have
a relatively functional product, we can begin to implement some of the
updates, improvements, and wishes that can be better done more easily with
wxPython. If you are interested in helping but don't know Python or
wxPython, take heart. Even I could learn enough to do something useful in a
fairly short time.

If you want to download and try out gism.py, I made a section on the GRASS
WIKI for it in the development/python section and linked it to the tgz
package on my website for download. I also uploaded the tgz file to the
WIKI, but can't figure out how to link it to the text section I did (Can
someone advise me on this?)

Thanks, looking forward to contribute a bit

jachym

--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/jachym_cepicky-gpg_public_key.asc
-----------------------------------------
OFFICE:
GDF-Hannover
Mengendamm 16d
30177 Hannover
Germany
e-mail: cepicky@gdf-hannover.de
URL: http://gdf-hannover.de
Tel.: +49 511-39088507

very nice!

I would be interested to help within a couple of months from now.

Used it on a Linux Mandriva 2007.
When closing the window of Import (or export) by the Upper Right X
button, it reopens the dialog once. if closed again the sme way, then
it does not come back.

Same comments on resizing, the display flickers and troubles the cursor.
Really like it ! Congrats!

Yann

On 04/08/06, Michael Barton <michael.barton@asu.edu> wrote:

Building on Jachym¹s work and doing a personal Œsummer of code¹ since I¹m
not in the field for a change, I¹ve completed a 2nd version of a wxPython
GUI for GRASS 6.

It was developed and tested with wxPython 2.6.3 (ANSI version) and Python
2.4.3 (ActiveStates binary) for Mac OS X. The wxPython site is at
<http://wiki.wxpython.org/index.cgi/wxPython&gt; and has links to Python
downloads. Currently, the command line interface, display window, and
example menu items are functional. There is also a non-functional demo tree
control for GIS layers and notebook interface. I haven¹t yet done options
panels or their equivalents.

In the command console window, you can enter GRASS (or other) commands to be
parsed by the OS. Yes, you can even enter display commands and they will
magically create displays. You can chain together display commands,
separated by commas. For example, you can type...

d.rast elevation_dem, d.vect roads color=red

...to create a display of a DEM overlayed by a red road network from the
Spearfish60 demo data set. For some reason g.list bombs. But other commands
seem to work pretty well, and can also launch the current TclTk GUI dialogs.
You can open multiple display windows; the one on top and active (i.e.,
click it) is the one that will receive and process display commands from the
console.

Zoom in, zoom out, and pan controls are functional in the map display
window, though zooming is a bit ugly. A few demo menu items are included.
These could be redone as a toolbox, as several have suggested, using an icon
mode listcontrol. There is a simple treecontrol for layers. I haven't added
any icons. There is a nice custom treecontrol available that can have
checkboxes and other widgets that we might want to use.

Please give it a try and see what you think. It is especially important to
see if it runs well cross-platform. I'm sure there are bugs, and the error
trapping is minimal. I'm sure that the code could (and should) be
modularized and optimized more. However, it seems to do much of the basic UI
work that we need. While wxPython lacks a few items that we use in TclTk, it
has a number of other widgets or more sophisticated versions of widgets that
are lacking or underdeveloped in TclTk. Given that I knew ZERO Python in
May, to have come this far in a few months is a testament to the relative
ease of programming in this platform. I'm sold on it for GRASS UI
development because of its flexibility, versitility, power, and ease of
programming. For anyone interested, my references have been:

Rappin, Noel and Robin Dunn
    2006 wxPython in Action. Manning Publications, Greenwich, CT.

Hetland, Magnus
    2005 Beginning Python: from Novice to Professional.
Apress/Springer-Verlag, NY.

And the ActiveStates Python 2.4 documentation package.

I've used SPE (cross-platform, open source) as an integrated development.
environment (IDE) for coding.

After this has been evaluated a bit and (hopefully) works for everyone, the
next step could be to divide up the tasks of porting the GUI from TclTk to
wxPython, trying to follow the GUI roadmap. This is a very big job and could
use the coordinated work of several people. As we do that, and after we have
a relatively functional product, we can begin to implement some of the
updates, improvements, and wishes that can be better done more easily with
wxPython. If you are interested in helping but don't know Python or
wxPython, take heart. Even I could learn enough to do something useful in a
fairly short time.

If you want to download and try out gism.py, I made a section on the GRASS
WIKI for it in the development/python section and linked it to the tgz
package on my website for download. I also uploaded the tgz file to the
WIKI, but can't figure out how to link it to the text section I did (Can
someone advise me on this?)

Enjoy!

Michael
__________________________________________
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

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

A VERY good idea.

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

From: Jachym Cepicky <jachym.cepicky@centrum.cz>
Date: Fri, 4 Aug 2006 10:29:48 +0200
To: Michael Barton <michael.barton@asu.edu>
Cc: Grass Developers List <grass-dev@grass.itc.it>, Trevor Wiens
<twiens@interbaun.com>, David Finlayson <david.p.finlayson@gmail.com>
Subject: Re: [GRASS-dev] WxPython prototype GRASS GUI. Version 2

First step could be, implement Jan-Oliver's grassgui.py script
(grass6/gui/wxpython) :slight_smile: should be pretty easy.

> First step could be, implement Jan-Oliver's grassgui.py script
> (grass6/gui/wxpython) :slight_smile: should be pretty easy.

Well, it actually works already.. somehow.

1-copy grass6/gui/wxpython/grassgui.py and
grass6/gui/wxpython/grass-interface.py into py_gm/ from which you run
the "python gism.py &" command.

2-open GRASScvs and select i.e. Spearfish

3-cd /dir/to/py_gm/ ; python gism.py &

4-Once the gism.py opens the GRASS GIS GUI, type the following in the
command line interface of the GUI: "d.rast --interface-description |
python grassgui.py"

5-d.rast GUI will appear, type i.e. elevation.10m, then select OK
button and close the d.rast GUI (Upper Right X Button for example).
After destroying the d.rast GUI, elevation.10m will be displayed in
the Map Display-1.

anybody who knows a little bit of Python might indicate how we could
get this seemlessly into the actual GUI.

Yann

On 05/08/06, Michael Barton <michael.barton@asu.edu> wrote:

A VERY good idea.

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

> From: Jachym Cepicky <jachym.cepicky@centrum.cz>
> Date: Fri, 4 Aug 2006 10:29:48 +0200
> To: Michael Barton <michael.barton@asu.edu>
> Cc: Grass Developers List <grass-dev@grass.itc.it>, Trevor Wiens
> <twiens@interbaun.com>, David Finlayson <david.p.finlayson@gmail.com>
> Subject: Re: [GRASS-dev] WxPython prototype GRASS GUI. Version 2
>
> First step could be, implement Jan-Oliver's grassgui.py script
> (grass6/gui/wxpython) :slight_smile: should be pretty easy.
>

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

On a Imac running PPC 10.4.7
I got this error when launching
21:12:53: No handler found for image type.
21:12:53: no bitmap handler for type 50 defined.
Other than that it works.
I have a hard time figuring up the correct setting until I got this
"You’ll want to add the following environment variables. Open or create the file .bash_profile in your home directory and add the following:
PYTHONBIN=/Library/Frameworks/Python.framework/Versions/2.4/bin
export PATH=/usr/local/bin:/usr/local/sbin:$PYTHONBIN:$PATH
"
Agustin


Dr. Agustin Diez Castillo
Departament de Prehistoria i Arqueologia
Universitat de Valencia Phone: +34 963 86 42 42
Avda. Blasco Iba–ez, 28 Fax: +34 963 98 38 87
Valencia 46010


On 04/08/2006, at 07:55 AM, Michael Barton wrote:

d.rast elevation_dem, d.vect roads color=red

Do you mean grass-interface.dtd? I have no grass-interface.py

grass6/gui/wxpython/grass-interface.py into py_gm/ from which you run

Hola Agustin,

The first 2 errors (I think) are because it somehow can’t find the icon images in the icon folder that come with the package. It should find these if the icon folder is correctly located inside the py_gm folder and you cd to this folder to run gism.py. Could you check these?

For the second error, I don’t have PYTHONBIN set on my Mac (at least not obviously). Nothing is returned with $PYTHONBIN and I don’t have a .bash_profile.

That said, I’m sure that something is set to point toward the Python 2.4 installation. I installed ActiveState’s Python 2.4 binaries and this probably does some automatic environment setting. Also, there is Apple’s Python 2.3 installed in a slightly different location that may cause confusion. The message you got is probably a good idea to make sure that the proper Python installation is being referenced.

Michael


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


From: Agustin Diez Castillo adiez@uv.es
Date: Sat, 5 Aug 2006 12:42:33 +0200
To: Michael Barton michael.barton@asu.edu
Cc: Grass Developers List grass-dev@grass.itc.it
Subject: Re: [GRASS-dev] WxPython prototype GRASS GUI. Version 2

On a Imac running PPC 10.4.7
I got this error when launching
21:12:53: No handler found for image type.
21:12:53: no bitmap handler for type 50 defined.
Other than that it works.
I have a hard time figuring up the correct setting until I got this
"You’ll want to add the following environment variables. Open or create the file .bash_profile in your home directory and add the following:
PYTHONBIN=/Library/Frameworks/Python.framework/Versions/2.4/bin
export PATH=/usr/local/bin:/usr/local/sbin:$PYTHONBIN:$PATH
"
Agustin


Dr. Agustin Diez Castillo
Departament de Prehistoria i Arqueologia
Universitat de Valencia Phone: +34 963 86 42 42
Avda. Blasco Iba–ez, 28 Fax: +34 963 98 38 87
Valencia 46010


On 04/08/2006, at 07:55 AM, Michael Barton wrote:

d.rast elevation_dem, d.vect roads color=red

This is great. I'll have to try it out and see what happens.

Michael
__________________________________________
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

From: Yann Chemin <ychemin@gmail.com>
Date: Sat, 5 Aug 2006 14:12:05 +0700
To: Grass Developers List <grass-dev@grass.itc.it>
Subject: Re: [GRASS-dev] WxPython prototype GRASS GUI. Version 2

First step could be, implement Jan-Oliver's grassgui.py script
(grass6/gui/wxpython) :slight_smile: should be pretty easy.

Well, it actually works already.. somehow.

1-copy grass6/gui/wxpython/grassgui.py and
grass6/gui/wxpython/grass-interface.py into py_gm/ from which you run
the "python gism.py &" command.

2-open GRASScvs and select i.e. Spearfish

3-cd /dir/to/py_gm/ ; python gism.py &

4-Once the gism.py opens the GRASS GIS GUI, type the following in the
command line interface of the GUI: "d.rast --interface-description |
python grassgui.py"

5-d.rast GUI will appear, type i.e. elevation.10m, then select OK
button and close the d.rast GUI (Upper Right X Button for example).
After destroying the d.rast GUI, elevation.10m will be displayed in
the Map Display-1.

anybody who knows a little bit of Python might indicate how we could
get this seemlessly into the actual GUI.

Yann

On 05/08/06, Michael Barton <michael.barton@asu.edu> wrote:

A VERY good idea.

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

From: Jachym Cepicky <jachym.cepicky@centrum.cz>
Date: Fri, 4 Aug 2006 10:29:48 +0200
To: Michael Barton <michael.barton@asu.edu>
Cc: Grass Developers List <grass-dev@grass.itc.it>, Trevor Wiens
<twiens@interbaun.com>, David Finlayson <david.p.finlayson@gmail.com>
Subject: Re: [GRASS-dev] WxPython prototype GRASS GUI. Version 2

First step could be, implement Jan-Oliver's grassgui.py script
(grass6/gui/wxpython) :slight_smile: should be pretty easy.

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

Agustin,

This is a typo. You need to get this from the cvs. You can use the web version to download it.

http://freegis.org/cgi-bin/viewcvs.cgi/grass6/gui/wxpython/grassgui.py

Michael


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


From: Agustin Diez Castillo adiez@uv.es
Date: Sat, 5 Aug 2006 13:31:30 +0200
To: Yann Chemin ychemin@gmail.com
Cc: Grass Developers List grass-dev@grass.itc.it
Subject: Re: [GRASS-dev] WxPython prototype GRASS GUI. Version 2

Do you mean grass-interface.dtd? I have no grass-interface.py

grass6/gui/wxpython/grass-interface.py into py_gm/ from which you run

Michael,
I didn’t explain myself

PYTHONBIN=/Library/Frameworks/Python.framework/Versions/2.4/bin

was the solution I found to direct python to ActiveState. I have tested it in another machine and it is working w/o problem besides the icon thing.To me it seems that the icons are there, I have changed permissions with no luck.
My py_gm directory
/py_gm agus$ ls -l
total 240
-rw-r–r-- 1 agus agus 1237 Aug 4 06:55 README.txt
-rwxrwxr-x 1 agus agus 14325 Aug 4 06:40 gism.py
-rw-r–r-- 1 agus agus 14325 Aug 4 06:39 gism.py.bak
-rw-r–r-- 1 agus agus 12364 Aug 5 12:32 gism.pyc
-rw-rw-r-- 1 agus agus 4448 Jul 3 23:02 grass-interface.dtd
-rwxrwxr-x 1 agus agus 12950 Jul 3 23:21 grassgui.py
drwxr-xr-x 20 agus agus 680 Aug 4 20:39 icons
-rwxr-xr-x 1 agus agus 12022 Aug 4 06:15 map.py
-rw-r–r-- 1 agus agus 11048 Aug 5 12:32 map.pyc
-rwxrwxr-x 1 agus agus 8871 Aug 4 06:16 render.py
-rw-r–r-- 1 agus agus 6533 Aug 5 12:32 render.pyc

…/py_gm agus$ cd icons

…/py_gm/icons agus$ ls -l
total 88
-rwxrwxr-x 1 agus agus 0 Aug 4 20:39 Makefile
-rwxr-xr-x 1 agus agus 580 May 5 20:03 Makefile.1
-rwxrwxr-x 1 agus agus 0 Aug 4 20:39 README
-rwxr-xr-x 1 agus agus 1129 Mar 23 19:56 README.1
-rwxr-xr-x 1 agus agus 250 May 6 00:10 element-cell.1.gif
-rwxrwxr-x 1 agus agus 0 Aug 4 20:39 element-cell.gif
-rwxr-xr-x 1 agus agus 189 May 6 00:12 element-vector.1.gif
-rwxrwxr-x 1 agus agus 0 Aug 4 20:39 element-vector.gif
-rw-r–r-- 1 agus agus 258 May 5 22:02 gui-display.gif
-rwxr-xr-x 1 agus agus 180 May 5 22:47 gui-pan.1.gif
-rwxrwxr-x 1 agus agus 0 Aug 4 20:39 gui-pan.gif
-rwxr-xr-x 1 agus agus 137 May 5 22:55 gui-startmon.1.gif
-rwxrwxr-x 1 agus agus 0 Aug 4 20:39 gui-startmon.gif
-rwxr-xr-x 1 agus agus 191 May 5 21:54 gui-zoom_back.gif
-rwxr-xr-x 1 agus agus 184 May 5 21:51 gui-zoom_in.gif
-rwxr-xr-x 1 agus agus 180 May 5 21:58 gui-zoom_out.gif
-rwxr-xr-x 1 agus agus 176 Jun 11 14:58 pan.gif
…/py_gm/icons agus$ chmod a+wx *

On 05/08/2006, at 05:35 PM, Michael Barton wrote:

Hola Agustin,

The first 2 errors (I think) are because it somehow can’t find the icon images in the icon folder that come with the package. It should find these if the icon folder is correctly located inside the py_gm folder and you cd to this folder to run gism.py. Could you check these?

For the second error, I don’t have PYTHONBIN set on my Mac (at least not obviously). Nothing is returned with $PYTHONBIN and I don’t have a .bash_profile.

That said, I’m sure that something is set to point toward the Python 2.4 installation. I installed ActiveState’s Python 2.4 binaries and this probably does some automatic environment setting. Also, there is Apple’s Python 2.3 installed in a slightly different location that may cause confusion. The message you got is probably a good idea to make sure that the proper Python installation is being referenced.

Michael


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


From: Agustin Diez Castillo <adiez@uv.es>
Date: Sat, 5 Aug 2006 12:42:33 +0200
To: Michael Barton <michael.barton@asu.edu>
Cc: Grass Developers List <grass-dev@grass.itc.it>
Subject: Re: [GRASS-dev] WxPython prototype GRASS GUI. Version 2

On a Imac running PPC 10.4.7
I got this error when launching
21:12:53: No handler found for image type.
21:12:53: no bitmap handler for type 50 defined.
Other than that it works.
I have a hard time figuring up the correct setting until I got this
"You’ll want to add the following environment variables. Open or create the file .bash_profile in your home directory and add the following:
PYTHONBIN=/Library/Frameworks/Python.framework/Versions/2.4/bin
export PATH=/usr/local/bin:/usr/local/sbin:$PYTHONBIN:$PATH
"
Agustin


Dr. Agustin Diez Castillo
Departament de Prehistoria i Arqueologia
Universitat de Valencia Phone: +34 963 86 42 42
Avda. Blasco Iba–ez, 28 Fax: +34 963 98 38 87
Valencia 46010


On 04/08/2006, at 07:55 AM, Michael Barton wrote:

d.rast elevation_dem, d.vect roads color=red

Agustin,

For some reason, I don’t need to set PYTHONBIN. But it is probably a good idea to set it to make sure of the python path.

For the icons, I’m baffled. Have you tried to look at the icon gifs to see if they are perhaps corrupted?

Michael


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

From: Agustin Diez Castillo adiez@uv.es
Date: Sat, 5 Aug 2006 18:24:12 +0200
To: Michael Barton michael.barton@asu.edu
Cc: Agustín Diez Castillo Agustin.Diez@uv.es, Grass Developers List grass-dev@grass.itc.it
Subject: Re: [GRASS-dev] WxPython prototype GRASS GUI. Version 2

Michael,
I didn’t explain myself

PYTHONBIN=/Library/Frameworks/Python.framework/Versions/2.4/bin

was the solution I found to direct python to ActiveState. I have tested it in another machine and it is working w/o problem besides the icon thing.
To me it seems that the icons are there, I have changed permissions with no luck.

Sorry it was a typo indeed,
grass-interface.dtd and grassgui.py are the two files to be copied
over to py_gm/

<To List>

Would it be possible to drop py_gm/ into grass6/gui/wxpython/ ? since
they both can interoperate, it should facilitate the temptation of a
python programmer to "plug" them together through the py_gm/
buttons...

Another thought, would it be interesting to develop a program to
convert the .tcl code into python interface? or is it better to recode
directly in Python?

</To List>

Yann

On 05/08/06, Agustin Diez Castillo <adiez@uv.es> wrote:

Do you mean grass-interface.dtd? I have no grass-interface.py

grass6/gui/wxpython/grass-interface.py into py_gm/ from which you run

Made some menus in the raster module, try them out...
took me 10 minutes, quite easy.

r.mapcalc bombs...
but others work fine (did not try them all though).

yann

(attachments)

gism.py (16.9 KB)

Moritz and Yann,

I forgot to ask you. Are you using whatever came with Debian unstable, or
did you install the latest and greatest Python 2.4.2.xx (I'm on 2.4.3.11)
and wxPython 2.6.3.x?

Image dragging works very smoothly on my Mac. How does resizing look? A
buffered DC can be used to reduce flicker, but is a bit of a pain to
implement. Need to know if it is needed on some systems or the problem is an
issue of different versions of the software.

Check out the new version I just uploaded.

Cheers
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

From: Moritz Lennert <mlennert@club.worldonline.be>
Date: Fri, 04 Aug 2006 10:28:47 +0200
To: Michael Barton <michael.barton@asu.edu>
Cc: Grass Developers List <grass-dev@grass.itc.it>, Jachym Cepicky
<jachym.cepicky@centrum.cz>, Trevor Wiens <twiens@interbaun.com>, David
Finlayson <david.p.finlayson@gmail.com>
Subject: Re: [GRASS-dev] WxPython prototype GRASS GUI. Version 2

Panning however causes problems for me:

- first the screen flashes very frequently while the map moves
- once the map is in its new position, I cannot use the mouse anymore,
only my keyboard. However, when I change to another workspace of my
Gnome desktop and then switch back again, the map display is empty, but
I can use my mouse again.

Sorry it was a typo indeed,
grass-interface.dtd and grassgui.py are the two files to be copied
over to py_gm/

Yes. I quickly found you you need grassgui.py and grassgui.dtd. Is the
latter an xml schema???

Would it be possible to drop py_gm/ into grass6/gui/wxpython/ ? since
they both can interoperate, it should facilitate the temptation of a
python programmer to "plug" them together through the py_gm/
buttons...

See my post from today. I agree with putting this in that local. If there is
general agreement, I can do so. But also see the problem I had with running
it from something like $GISBASE/etc/wxp. Maybe you know what I am doing
wrong there.

I just did plug them together. Works pretty slick.

Another thought, would it be interesting to develop a program to
convert the .tcl code into python interface? or is it better to recode
directly in Python?

For me at least, it is easier to just recode. But maybe someone out there is
clever enough to do this. It would be a big time saver.

Michael

Yann

On 05/08/06, Agustin Diez Castillo <adiez@uv.es> wrote:

Do you mean grass-interface.dtd? I have no grass-interface.py

grass6/gui/wxpython/grass-interface.py into py_gm/ from which you run

__________________________________________
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

Yann,

We need to merge this with the new version I just posted on the WIKI.
Definitely need to move this into the CVS.

Markus, procedure?

Michale
__________________________________________
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

From: Yann Chemin <ychemin@gmail.com>
Date: Mon, 7 Aug 2006 22:44:36 +0700
To: Grass Developers List <grass-dev@grass.itc.it>
Subject: Re: [GRASS-dev] WxPython prototype GRASS GUI. Version 2

Made some menus in the raster module, try them out...
took me 10 minutes, quite easy.

r.mapcalc bombs...
but others work fine (did not try them all though).

yann

Hi, i just finished the whole raster module,
here is the file attached, please try it.
Few commands missing (remarked IN BOLD in the dialog).
Looks quite nice.

I am using python 2.4.3 on Mandriva 2007.0, not sure about wxpython.

I am going to be busy up to next week,

Yann

On 08/08/06, Michael Barton <michael.barton@asu.edu> wrote:

Yann,

We need to merge this with the new version I just posted on the WIKI.
Definitely need to move this into the CVS.

Markus, procedure?

Michale
__________________________________________
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

> From: Yann Chemin <ychemin@gmail.com>
> Date: Mon, 7 Aug 2006 22:44:36 +0700
> To: Grass Developers List <grass-dev@grass.itc.it>
> Subject: Re: [GRASS-dev] WxPython prototype GRASS GUI. Version 2
>
> Made some menus in the raster module, try them out...
> took me 10 minutes, quite easy.
>
> r.mapcalc bombs...
> but others work fine (did not try them all though).
>
> yann

(attachments)

gism.py (33.1 KB)