def redraw_now(self, whence=0):
        """Redraw the displayed image.

        Parameters
        ----------
        whence
            See :meth:`get_rgb_object`.

        """
        try:
            time_start = time.time()
            self.redraw_data(whence=whence)

            # finally update the window drawable from the offscreen surface
            self.update_image()

            time_done = time.time()
            time_delta = time_start - self.time_last_redraw
            time_elapsed = time_done - time_start
            self.time_last_redraw = time_done
            self.logger.debug(
                "widget '%s' redraw (whence=%d) delta=%.4f elapsed=%.4f sec" % (
                    self.name, whence, time_delta, time_elapsed))

        except Exception as e:
            self.logger.error("Error redrawing image: %s" % (str(e)))
            try:
                # log traceback, if possible
                (type, value, tb) = sys.exc_info()
                tb_str = "".join(traceback.format_tb(tb))
                self.logger.error("Traceback:\n%s" % (tb_str))
            except Exception:
                tb_str = "Traceback information unavailable."
                self.logger.error(tb_str)
def redraw_now ( self , whence = 0 ) : try : time_start = time . time ( ) self . redraw_data ( whence = whence ) self . update_image ( ) time_done = time . time ( ) time_delta = time_start - self . time_last_redraw time_elapsed = time_done - time_start self . time_last_redraw = time_done self . logger . debug ( "widget '%s' redraw (whence=%d) delta=%.4f elapsed=%.4f sec" % ( self . name , whence , time_delta , time_elapsed ) ) except Exception as e : self . logger . error ( "Error redrawing image: %s" % ( str ( e ) ) ) try : ( type , value , tb ) = sys . exc_info ( ) tb_str = "" . join ( traceback . format_tb ( tb ) ) self . logger . error ( "Traceback:\n%s" % ( tb_str ) ) except Exception : tb_str = "Traceback information unavailable." self . logger . error ( tb_str )
Redraw the displayed image.

        Parameters
        ----------
        whence
            See :meth:`get_rgb_object`.