<html style="direction: ltr;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body bidimailui-charset-is-forced="true" style="direction: ltr;"
text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-cite-prefix">On 6/1/19 4:43 PM, Le Jeune Yann wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CABjUk1rN-xJVYGD-RPavP0=_rP8BeUpMeKdJCKAJ9si06CcuJA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hello !<br>
</div>
<div><br>
</div>
<div>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.</div>
<div>I have tried :</div>
<div>PROCESS_ID = os.getpid()</div>
<div>...<br>
</div>
<div>TEMP1 = grass.read_command ('g.tempfile',<br>
pid = PROCESS_ID)</div>
<div><br>
</div>
<div>But this changes nothing, after about 67200 calculations of
r.viewshed no more temporary file can be created and the
script stopped.<br>
</div>
<div><br>
</div>
</div>
</blockquote>
<p><br>
</p>
<p>Are you manually removing the TEMP1 files within your script? I
think that GRASS cleans up tempfiles only when the session exits,
so with such a large number of calculations, you should manually
remove them within the script.</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CABjUk1rN-xJVYGD-RPavP0=_rP8BeUpMeKdJCKAJ9si06CcuJA@mail.gmail.com">
<div dir="ltr">
<div>It seems to me that i miss something... If anyone knows how
to solve that ?</div>
<div><br>
</div>
<div>Thanks for your help</div>
<div><br>
</div>
<div>yann<br>
</div>
<div>-- <br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div><br style="color:rgb(153,0,0)">
<font size="1"><span style="color:rgb(102,0,0)">Yann
Le Jeune</span></font><br>
<font size="1">Web : <a
href="http://www.paleosystem.fr" target="_blank"
moz-do-not-send="true">http://www.paleosystem.fr</a></font>
<font size="1"><a href="https://ello.co/yannz"
target="_blank" moz-do-not-send="true">https://ello.co/yannz</a></font><br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a></pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918</pre>
</body>
</html>