[GRASS-dev] [GRASS GIS] #2665: d.* modules not working from python or bash scripts (GRASS 7.0, Linux / Windows7)
GRASS GIS
trac at osgeo.org
Wed Apr 29 10:17:55 PDT 2015
#2665: d.* modules not working from python or bash scripts (GRASS 7.0, Linux /
Windows7)
-------------------------+-------------------------------------------------
Reporter: santipardo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.1
Component: Display | Version: 7.0.0
Resolution: | Keywords: d.mon, d.vect, d.rast, python,
| script, bash
CPU: x86-64 | Platform: All
-------------------------+-------------------------------------------------
Comment (by santipardo):
This is weird. The commands are written to the cmd file of the monitor
(e.g.: .tmp/24518.0.cmd):
{{{
d.rast map="M01relief" bgcolor="white"
d.vect map="M03PTEtramos" layer="1" display="shape"
type="point,line,boundary,area,face" color="black"
fill_color="200:200:200" width=2 width_scale=1 icon="basic/x" size=5
label_layer="1" label_color="red" label_bgcolor="none" label_bcolor="none"
label_size=8 xref="left" yref="center"
}}}
But I do not get the layers shown until I manually open the file (in a
text editor) and save it. Using some python code to open, edit and save
the trick doesn't work:
{{{
with open(rutamon, 'a') as comandos:
comandos.write('d.redraw')
comandos.close()
}}}
Here I open the file in append mode, and add a line for 'd.redraw'. But it
doesn't work, I have to open and save manually the file...
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2665#comment:1>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list