progress bar in addon

Paulo van Breugel <[email protected]> Sat, 19 Jun 2021 12:01:23 +0200
Newsgroups gmane.comp.gis.grass.devel
Message-ID <CAGrkfcKUTe8UF_shi3wz6GbqM6sF8PmcU7U9KND=+B7G-2c+Ng@mail.gmail.com>
--===============5597147712723703141==
Content-Type: multipart/alternative; boundary="000000000000f4a93305c51b87b6"

--000000000000f4a93305c51b87b6
Content-Type: text/plain; charset="UTF-8"

Hi devs,

I would like to include a progress bar in a script / addon. I guess that is
going to be tricky, but even showing the progress bar of the individual
functions would be useful. E.g.,  when the script runs two functions in
sequence:

gs.run_command("r.univar", ....)
gs.run_commaqnd("r.mapcalc", ...)

I would be happy if I could make it show the progress bar for the r.univar
function when that one is running, and next, show the progress bar for
r.mapcalc when that is running. I have found
https://grasswiki.osgeo.org/wiki/GRASS_Python_Scripting_Library#Percentage_output_for_progress_of_computation,
but I am not sure how to go from there. Any ideas or examples?

Cheers,

Paulo

--000000000000f4a93305c51b87b6
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi devs,</div><div><br></div><div>I would like to inc=
lude a progress bar in a script / addon. I guess that is going to be tricky=
, but even showing the progress bar of the individual functions would be us=
eful. E.g.,=C2=A0 when the script runs two functions in sequence:<br></div>=
<div><br></div><div>gs.run_command(&quot;r.univar&quot;, ....)</div><div>gs=
.run_commaqnd(&quot;r.mapcalc&quot;, ...)</div><div><br></div><div>I would =
be happy if I could make it show the progress bar for the r.univar function=
 when that one is running, and next, show the progress bar for r.mapcalc wh=
en that is running. I have found <a href=3D"https://grasswiki.osgeo.org/wik=
i/GRASS_Python_Scripting_Library#Percentage_output_for_progress_of_computat=
ion">https://grasswiki.osgeo.org/wiki/GRASS_Python_Scripting_Library#Percen=
tage_output_for_progress_of_computation</a>, but I am not sure how to go fr=
om there. Any ideas or examples?<br></div><div><br></div><div>Cheers,</div>=
<div><br></div><div>Paulo<br></div></div>

--000000000000f4a93305c51b87b6--

--===============5597147712723703141==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
grass-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-dev

--===============5597147712723703141==--