[GRASS-user] problems starting wxPython gui using wingrass

Moritz Lennert mlennert at club.worldonline.be
Wed Jan 16 18:09:57 EST 2008


On Wed, January 16, 2008 23:30, Michael Barton wrote:
> As Martin explained better than I, there is old code in the release
> branch. But if you update from the SVN trunk, you don't need to copy
> the wxPython GUI code anywhere. It is already where it is supposed to
> go.
>
> I just looked at the WinGRASS binary code and see the problem. For
> some reason, it is not in this binary. It is in the Mac binaries,
> which is why this has seemed so odd to me.

I can include it. The last time I tried, however, there were a few linux
specific functions which kept it from working (see
http://lists.osgeo.org/pipermail/grass-gui/2007-November/000639.html)

>
> If you want to put it in manually, the gui code goes into $GISBASE/etc/
> wx (you'll have to make the directory). You need to also get the
> wxgrass bash script and put it into $GISBASE/scripts.

This should work from within msys, but won't work when called from cmd.exe
as you cannot easily use shell scripts there. We would need a cmd.exe .bat
file. On the other hand, it might be easier if the wxgrass team could just
rewrite that shell script to python and thus make it portable across all
platforms.

But you can launch wxgrass quite easily by running the command contained
in the wxgrass shell file yourself, i.e. something like:

c:\programme\Python25\python.exe c:\grass\grass-6.3.svn\etc\wx\wxgui.py

However, I currently get the following error:

*****
Traceback (most recent call last):
  File "c:\grass\grass-6.3.svn\etc\wx\wxgui.py", line 53, in <module>
    import gui_modules.utils as utils
  File "C:\grass\grass-6.3.svn\etc\wx\gui_modules\utils.py", line 23, in
<module
>
    import gcmd
  File "c:\grass\grass-6.3.svn\etc\wx\gui_modules\gcmd.py", line 32, in
<module>
    from win32file import ReadFile, WriteFile
ImportError: No module named win32file
****

and am too tired to look into it now.

Moritz



More information about the grass-user mailing list