[GRASS-user] Deleting temporary files in a Python script

Le Jeune Yann lj.yann at gmail.com
Sat Jun 1 06:43:14 PDT 2019


Hello !

I would like to delete temporary files during the process of a python
script. I have look at g.tempfile but it seems I don't know how to use it
in a python script.
I have tried :
PROCESS_ID = os.getpid()
...
TEMP1 = grass.read_command ('g.tempfile',
    pid = PROCESS_ID)

But this changes nothing, after about 67200 calculations of r.viewshed no
more temporary file can be created and the script stopped.

It seems to me that i miss something... If anyone knows how to solve that ?

Thanks for your help

yann
-- 

Yann Le Jeune
Web : http://www.paleosystem.fr https://ello.co/yannz
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20190601/1605a8f5/attachment.html>


More information about the grass-user mailing list