Hi,
2017-01-04 11:59 GMT+01:00 Ang Sherpa <[email protected]>:
> My script work from "Launch Script" command within Grass Gis environment.
> However, as a standalone script it just executes nothing not even error. So,
> sleep.time(2) is also not working as expected. Am I missing something?
> I have attached the script that I used herewith this mail.
>
> Will be looking forward to hearing from you.
interactive monitors require running GRASS. It is probably reason why
wx monitor is not even launched since your script already terminates
(and GRASS session too). It has no reason to use interactive monitors
outside of GRASS. If you modify your script like:
gscript.run_command('d.mon', stop='wx6') # we asssume that there is
already monitors hanging from last run
gscript.run_command('d.mon',start='wx6',resolution='1')
time.sleep(2)
gscript.run_command('d.rast',map='elevation')
time.sleep(200)
os.remove(rcfile)
Then monitor shows and will running 200sec. But it has no sense. So I
suggest you to use:
1) file-based monitors (which is natural for script, generate
something, render to file and close)
script.run_command('d.mon',start='cairo',resolution='1',
output="/path/image.png")
# no need to sleep
gscript.run_command('d.rast',map='elevation')
gscript.run_command('d.mon', stop='cairo')
or
2) launch your script from running GRASS
Ma
--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user