dbdicom.Record.message#
- Record.message(message: str)[source]#
Print a message to the user.
- Parameters:
message (str) – Message to be printed.
Note
When working through a terminal a print statement would have exactly the same effect. The advantage of using the message interface is that the code does not need to be changed when the computation is run through a graphical user interface (assuming this uses a compatible API).
Another advantage is that messaging can be muted/unmuted using .mute() and .unmute() for instance when the object is passed to a subroutine.
See also
Example
>>> series.message('Starting computation..') Starting computation..
After muting the same statment does not send a message:
>>> series.mute() >>> series.message('Starting computation..')
Unmute to reactivate sending messages:
>>> series.unmute() >>> series.message('Starting computation..') Starting computation..