KekLib.ProgressInfoDialog#
ProgressInfoDialog.py
Copyright (c) 2017-2024, Masatsuyo Takahashi, KEK-PF
- class ProgressInfoDialog(parent, title, pinfo, description_cb=None, stream_labels=None, plot_init_cb=None, plot_update_cb=None, refresh_log_cb=None, plot_final_cb=None, is_alive_cb=None, refresh_interval=100, gc_collect_on_log=True, logger=None, debug=False)#
Bases:
Dialog
Initialize a dialog.
- Parameters:
window (parent -- a parent)
title (title -- the dialog)
- body(body_frame)#
create dialog body.
return widget that should have initial focus. This method should be overridden, and is called by the __init__ method.
- button_command(*args)#
- buttonbox()#
override standard buttonbox. add “Default” button
- cancel()#
We have to override Dialog.cancel because the following call is implemented in Dialog.__init__
self.protocol( “WM_DELETE_WINDOW”, self.cancel )
- get_log_text(fmt='%(asctime)s %(message)s', datefmt='%H:%M:%S')#
Convert log messages to text. On formats see logger.Formatter
- is_at_end()#
- refresh(terminate_loop=False)#
- refresh_log()#
- show(terminate_cb=None, logger=None)#
- terminate(btn_text)#
- class ProgressLoghandler(log_records)#
Bases:
Handler
Initializes the instance - basically setting the formatter to None and the filter list to empty.
- emit(record)#
Do whatever it takes to actually log the specified logging record.
This version is intended to be implemented by subclasses and so raises a NotImplementedError.
- make_disp_time(t_)#