[GRASSGUI] trying wxgrass on Windows
Moritz Lennert
mlennert at club.worldonline.be
Fri Jun 15 17:09:59 EDT 2007
On Fri, June 15, 2007 10:07, Michael Barton wrote:
> The new wxPython GRASS interface (AKA wxgrass) is pretty much equal in
> functionality to the standard TclTk interface, and so is ready for regular
> testing.
I decided to give it a try on Windows, directly launching 'python
wxgui.py' from within a grass session in cmd.exe.
There were quite a few errors, of which I don't know whether they are due
to the fact that this is windows (the first is) or because of path
definition issues or similar specificities.
In cmd.py you have the following function call on line 89:
self.module = subprocess.Popen(self.cmd,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
close_fds=True)
However, close_fds is not supported on Windows...
I can solve this by setting usePopenClass = False at line 25.
I then get (end of the traceback):
File "c:\grass\grass-6.3.cvs\etc\wx\gui_modules\mapdisp.py", line 1313,
in __init__
self.projinfo = self.Map.ProjInfo()
File "c:\grass\grass-6.3.cvs\etc\wx\gui_modules\render.py", line 460, in
ProjInfo
p = cmd.Command(cmdlist)
File "c:\grass\grass-6.3.cvs\etc\wx\gui_modules\cmd.py", line 134, in
__init__
(self.cmd, wait, self.returncode))
TypeError: int argument required
Line 134 is part of a debug message, so I can just comment it out
(although we should try to identify the reason for the error). This then
leads to the wxgrass windows opening.
Whenever I try to launch a command from the menu I get something like this:
File "c:\grass\grass-6.3.cvs\etc\wx\wxgui.py", line 377, in OnMenuCmd
menuform.GUI().ParseCommand(cmd,gmpath, parentframe=self)
File "c:\grass\grass-6.3.cvs\etc\wx\gui_modules\menuform.py", line 1110,
in ParseCommand
xml.sax.parseString( getInterfaceDescription( cmd ) , handler )
File "c:\grass\grass-6.3.cvs\etc\wx\gui_modules\menuform.py", line 1059,
in getInterfaceDescription
cmdout = p.sub( gmpath+r'/grass-interface.dtd', cmdout)
File "C:\Programme\Python25\lib\re.py", line 261, in _subx
template = _compile_repl(template, pattern)
File "C:\Programme\Python25\lib\re.py", line 248, in _compile_repl
raise error, v # invalid expression
sre_constants.error: bad group name
Similar error when adding a vector or raster layer:
File "c:\grass\grass-6.3.cvs\etc\wx\wxgui.py", line 693, in AddRaster
self.curr_page.maptree.AddLayer('raster')
File "C:\GRASSSRC\gui\gui_modules\wxgui_utils.py", line 446, in AddLayer
self.PropertiesDialog(layer)
File "C:\GRASSSRC\gui\gui_modules\wxgui_utils.py", line 459, in
PropertiesDialog
menuform.GUI().ParseCommand('d.rast', gmpath,
completed=(self.getOptData,layer,params), parentframe=self)
File "c:\grass\grass-6.3.cvs\etc\wx\gui_modules\menuform.py", line 1110,
in ParseCommand
xml.sax.parseString( getInterfaceDescription( cmd ) , handler )
File "c:\grass\grass-6.3.cvs\etc\wx\gui_modules\menuform.py", line 1059,
in getInterfaceDescription
cmdout = p.sub( gmpath+r'/grass-interface.dtd', cmdout)
File "C:\Programme\Python25\lib\re.py", line 261, in _subx
template = _compile_repl(template, pattern)
File "C:\Programme\Python25\lib\re.py", line 248, in _compile_repl
raise error, v # invalid expression
sre_constants.error: bad group name
Moritz
More information about the grass-gui
mailing list