[GRASS-user] Python placeholder (%d) in stdin statement of db.execute
johannesradinger at gmail.com
Thu Apr 11 02:34:55 PDT 2013
Thank you Hamish, including the option "input=-" in the python line (for
GRASS7) solved the problem.
Now I get an update/entry in my attribute table. This is a different
grass65 where this additional option is not needed.
On Thu, Apr 11, 2013 at 11:15 AM, Markus Metz <markus.metz.giswork at gmail.com
> On Thu, Apr 11, 2013 at 8:58 AM, Hamish <hamish_b at yahoo.com> wrote:
> > Johannes wrote:
> >> I just tested it again and realized this problem is
> >> not related to the placeholder in the python code,
> >> but probably an other issue of my pythoncode line
> >> nothing is update when use:
> >> grass.write_command("db.execute", stdin = "UPDATE my points
> >> SET prob=100")
> >> but using UPDATE my points SET prob=100 in the module GUI
> >> works as mentioned already before.
> >> Has anyone experience in using db.execute in python with
> >> standard input in GRASS7?
> > in GRASS7 you need to add "input=-" as an option to trigger
> > reading input stdin. (or else stalled module gui headaches..)
> > perhaps this needs to be changed to YES?
> > input->required = NO;
> No, because db.execute sql=<SQL statement> works just fine, input is
> not required.
> Markus M
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-user