On Sun, Sep 9, 2018 at 3:37 PM Markus Metz <[email protected]>
wrote:
>
>
>
> On Sun, Sep 9, 2018 at 4:46 PM Markus Neteler <[email protected]> wrote:
>
> >
> > I'd also like to see a way to print through the parser, i.e. a
> > functionality similiar to "sh -x shellscript" which prints every step.
> > Is that possible?
>
> In Python you mean? Maybe one of the GRASS Python gurus can answer that
(not me).

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):

grass --tmp-location XY --exec python -m trace --trace `grass
--tmp-location XY --exec which r.mask` -r

That gives little too much information, so perhaps:

FILE="`./bin.x86_64-pc-linux-gnu/grass77 --tmp-location XY --exec which
r.mask`"
grass --tmp-location XY --exec python -m trace --trace $FILE -r | grep
`basename $FILE`

Or do you want GRASS parser to print every module being executed?

Vaclav
_______________________________________________
grass-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to