[GRASS-dev] 'g.gui wxpython' won't work in wingrass as wxgui is a
shell script
Glynn Clements
glynn at gclements.plus.com
Wed Feb 20 22:09:08 EST 2008
Moritz Lennert wrote:
> as wxgui is a shell script, g.gui wxpython (which does:
>
> else if (strcmp(type->answer, "wxpython") == 0) {
> sprintf (progname, "%s/etc/wxpython/scripts/wxgui", G_gisbase());
> if (rc_file->answer) {
> G_spawn(progname, "wxgui", rc_file->answer, NULL);
> )
>
> will not work.
>
> I don't really see the need for this script and it is a nuisance for
> wingrass ot require a shell to launch the python gui...
Right; it may as well just do:
sprintf(progname, "%s/etc/wxpython/wxgui.py", G_gisbase());
if (rc_file->answer) {
G_spawn("python", "wxgui", progname, "--workspace", rc_file->answer, NULL);
}
else {
G_spawn("python", "wxgui", progname, NULL);
}
AFAICT, the only reason for making g.gui a C program rather than a
script is so that you don't need a Bourne shell (MSys etc) to start
the GUI.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list