[GRASS-dev] python raster_history function broken?

Glynn Clements glynn at gclements.plus.com
Thu Oct 30 15:00:27 PDT 2014


Luca Delucchi wrote:

> The raster_history function on my computer is not working.

> In [8]: 'CMDLINE' in os.environ.keys()
> Out[8]: False
> 
> What should CMDLINE environment variable do?

It contains an approximation to the command line used to run the
script, as a string It's set by grass.script.parser() (in
lib/python/script/core.py):

    cmdline = [basename(sys.argv[0])]
    cmdline += ['"' + arg + '"' for arg in sys.argv[1:]]
    os.environ['CMDLINE'] = ' '.join(cmdline)

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list