[GRASS-dev] Force --v flag whenever -l is instructed
Nikos Alexandris
nik at nikosalexandris.net
Mon Oct 9 06:19:57 PDT 2017
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20171009/7c16324c/attachment.sig>
More information about the grass-dev
mailing list