[GRASS-dev] winGRASS: running several python modules in bat-files fails

Helmut Kudrnovsky hellik at web.de
Wed Jun 14 06:02:02 PDT 2017


Helmut Kudrnovsky wrote
>>> v.db.addcolumn map=myreg2 columns="col1 inetger"
>>
>>typo in 'inetger'? 
> 
> oh :-)
> 
>> how does it fail? 
> 
> if you have several python modules listed in the bat file, only the first
> one starts, the other aren't invoked.
> 
> the reason may be: in winGRASS the python scripts are invoked by bat-file
> wrapper; if the first python module is started, it changes to the e.g.
> v.db.addtable.bat, invokes the python script, but then it doesnt't come
> back to test.bat, therefore the next python module in the list isn't
> started.

the solution is to call the python script wrapper:

REM ----------
@ECHO ON
g.region -p
v.in.region output=myreg3
call v.db.addtable map=myreg3
echo module done
call v.db.addcolumn map=myreg3 columns="col1 integer"
REM ----------



-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/winGRASS-running-several-python-modules-in-bat-files-fails-tp5324173p5324185.html
Sent from the Grass - Dev mailing list archive at Nabble.com.


More information about the grass-dev mailing list