Nikos:

I tested already (before asking)

env = os.environ.copy()
if list_only:
 env['GRASS_VERBOSE'] = '3'

but it does not work.

Moritz:

In Python, something like this should work IIRC:

import os
os.environ['GRASS_VERBOSE'] = '3'

But of course it works!  Don't know why I got stuck with env instead
os.environ.

For the records, it's somewhat about the logic of the script I am
building. Yet also that, copy(), as used in the first example,
creates a shallow copy.  Deep copy works, i.e.
`env=copy.deepcopy(os.environ)` or simply `env=os.environ`

Nikos

Attachment: signature.asc
Description: PGP signature

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to