<div dir="ltr"><div dir="ltr"><div dir="ltr"><br><br>On Sun, Sep 9, 2018 at 3:37 PM Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com" target="_blank">markus.metz.giswork@gmail.com</a>> wrote:<br>><br>><br>><br>> On Sun, Sep 9, 2018 at 4:46 PM Markus Neteler <<a href="mailto:neteler@osgeo.org" target="_blank">neteler@osgeo.org</a>> wrote:<br>><br>> ><br>> > I'd also like to see a way to print through the parser, i.e. a<br>> > functionality similiar to "sh -x shellscript" which prints every step.<br>> > Is that possible?<br>><br>> In Python you mean? Maybe one of the GRASS Python gurus can answer that (not me).<br><div><br></div><div>It is not clear to me either what you are asking for. Do you want every Python line? Python can do that with module `trace` (python -m trace --trace). Here is an example (just for testing purposes, using the --tmp-location and --exec):<br></div><div><br></div>grass --tmp-location XY --exec python -m trace --trace `grass --tmp-location XY --exec which r.mask` -r<br></div><div dir="ltr"><br></div><div>That gives little too much information, so perhaps:<br></div><div dir="ltr"><br><div>FILE="`./bin.x86_64-pc-linux-gnu/grass77 --tmp-location XY --exec which r.mask`"<br></div><div>grass --tmp-location XY --exec python -m trace --trace $FILE -r | grep `basename $FILE`<br></div><div><br></div><div>Or do you want GRASS parser to print every module being executed?</div><div><br></div><div>Vaclav<br></div></div></div></div>