[GRASS-dev] d.rast.edit in wxgrass

Glynn Clements glynn at gclements.plus.com
Mon Jun 25 18:56:28 EDT 2007


Michael Barton wrote:

> Ultimately, it would be nice if the wxPython parser is used automatically if
> GRASS_GUI = wx in the .grassrc6 file. Until that time, we need to manually
> send all commands to the wxPython parser in this way.

How do we invoke the wxPython UI as a stand-alone process?

For the Tcl/Tk UI, G_gui() essentially does:

	fp = popen("$GRASS_WISH", "w");
	fprintf(fp, "source $env(GISBASE)/etc/gui.tcl\n");
	generate_tcl(fp);

We need an equivalent sequence for wxPython, e.g.:

	fp = popen("python", "w");
	fprintf(fp, /* WHAT GOES HERE ? */);
	generate_xml(fp);

[There isn't a generate_xml() function at present; it's called
G_usage_xml() and has stdout hardcoded, so that needs to be
re-factored.]

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list