On 6/25/07, Glynn Clements <[EMAIL PROTECTED]> wrote:

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.]

Currently, menuform.py if run standalone will accept one argument, the
grass command, and will call it on its own to get back the
--xml-description. So an execve() should be enough, I think.

However, menuform.py should be stripped of most dependencies, such as
the cmd window.

Daniel.

--
-- Daniel Calvelo Aros

_______________________________________________
grass-dev mailing list
[email protected]
http://grass.itc.it/mailman/listinfo/grass-dev

Reply via email to