[GRASS-dev] [GRASS GIS] #3007: pygrass.messages.Messenger.percent() smallest step is 2

GRASS GIS trac at osgeo.org
Fri Apr 29 12:00:51 PDT 2016


#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)
 }}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3007>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list