#3007: pygrass.messages.Messenger.percent() smallest step is 2
---------------------+-------------------------
Reporter: lrntct | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: PyGRASS | Version: svn-trunk
Keywords: | CPU: x86-64
Platform: Linux |
---------------------+-------------------------
Even when the measured task is several hours long, Messenger.percent()
displays steps two by two, instead of an expected one by one. This could
give the false impression that the execution has stalled.
Bellow is a minimum working example:
{{{
from grass.pygrass.messages import Messenger
import time
total_time = 1000
msgr = Messenger()
for i in range(total_time):
msgr.percent(i, total_time, 1)
time.sleep(0.5)
}}}
Looking at the `G_percent` code I don't understand when is used the
function `G_set_percent_routine(int (*percent_routine) (int))` within the
GRASS code and where the default percent_routine is defined.