[GRASS-user] python parse_command

2018-02-12 Thread Jonathan Reith
 Dear list, I am struggling with my python code. I am trying to get the computational region of a xyz-file. If I use r.in.xyz in GRASS itself, it works all just fine, but using it in python I always get an error. Here is my code: from grass_session import Session from grass.script import

Re: [GRASS-user] python parse_command

2018-02-19 Thread Jonathan Reith
thanks for the answers, but this did not work. Again, here is my code, this time not just the minimum version: #!/usr/bin/env python import os from grass_session import Session from grass.script import core as gcore from grass.pygrass.modules.shortcuts import general as g from grass.pygrass.modu

Re: [GRASS-user] python parse_command

2018-02-19 Thread Jonathan Reith
36 b=159.04 t=206.46 res=1 -p ended with error Process ended with non-zero return code 1. See errors in the (error) output. # This leads to the question, how the input for g.region should look like in python? Again, any help is appreciated :) best regards Am 1

Re: [GRASS-user] python parse_command

2018-02-26 Thread Jonathan Reith
t error disappeared, but now I have a new one. running < g.region n=5611999 s=561 e=32361999 w=3236 b=159.04 t=206.46 res=1 -p > from command line in GRASS works just fine. Any help appreciated Jonathan Am 19.02.2018 um 18:49 schrieb Pietro: > Thank you Anna I did not noticed

Re: [GRASS-user] python parse_command

2018-02-26 Thread Jonathan Reith
Nope, still the same error Am 26.02.2018 um 15:35 schrieb Anna Petrášová: > Would > > parse=(grass.parse_key_val, {'sep': '=', 'vsep': ' '})) > > help? > > On Mon, Feb 26, 2018 at 4:53 AM, Jonathan Reith wrote: >> Ok. So n

Re: [GRASS-user] python parse_command

2018-02-26 Thread Jonathan Reith
7;676 s=887 e=88 w=4'} > > which is what you are getting. But with adding space as vsep, I get > correct results, so it should work. Are you sure you used space there? > > grass.parse_key_val('n=676 s=887 e=88 w=4', sep='=', vsep=' ') > >