[GRASS-dev] Re: lib/init/grass.py r37899

Martin Landa landa.martin at gmail.com
Thu Jun 18 14:36:33 EDT 2009


Hi,

2009/6/18 Glynn Clements <glynn at gclements.plus.com>:
>
> What is the intent of this change?

to run wxgui.py on the background, otherwise GRASS prompt is started
after closing wxGUI.

> --- lib/init/grass.py   (revision 37898)
> +++ lib/init/grass.py   (revision 37899)
> @@ -591,9 +591,10 @@
>
>     # Check for gui interface
>     if grass_gui == "wxpython":
> -       call([os.getenv('GRASS_PYTHON'),
> -              gfile("etc", "wxpython", "wxgui.py")])
> -
> +        subprocess.Popen([os.getenv('GRASS_PYTHON'),
> +                          gfile("etc", "wxpython", "wxgui.py")],
> +                         stdout=subprocess.PIPE)
> +
>
> Using subprocess.PIPE when nothing can read from the pipe is a bug.
>
> If output should go to the terminal, stdout shouldn't be set. If
> output should be discarded, use os.devnull (see check_gui for example
> usage).

Done in r37930.

Martin

-- 
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa


More information about the grass-dev mailing list