[GRASS-dev] Re: [GRASSGUI] Re: [grass-addons] r659 - trunk/grassaddons/gui/gui_modules

Martin Landa landa.martin at gmail.com
Wed May 16 13:15:01 EDT 2007


Glynn,

2007/5/16, Glynn Clements <glynn at gclements.plus.com>:

> > Are you thinking that we should change all calls to GRASS commands to use
> > the new cmd module?
>
> > > +        cmdString = "g.region -ugp region=%s" % wind
>
> > > +        p = cmd.Command (cmdString)
>
> This interface is broken, and needs to be replaced.
>
>            self.module = subprocess.Popen(self.cmd, shell=True,
>                                                     ^^^^^^^^^^
>
> Wrong. Wrong. Wrong. Wrong. Wrong. Wrong. Wrong. Wrong. Wrong.
>
> Just how clearly do I have to say this before it sinks in:
>
>         DO NOT USE THE SHELL
>
> Using the shell means problems with spaces, quotes and other shell
> metacharacters. There is no reason to use it. So don't.

OK, then we need to fix Command class... (I will look at it tomorrow)

Martin

> --
> Glynn Clements <glynn at gclements.plus.com>
>
> _______________________________________________
> grassgui mailing list
> grassgui at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grassgui
>


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




More information about the grass-dev mailing list