PYME.pyme_warnings module¶
- class PYME.pyme_warnings.NoninteractiveContext¶
Bases:
objectContext manager to indicate that we are running in a non-interactive environment - e.g. recipe execution. This will suppress wx.MessageBox warnings even if a GUI is available.
The code is used through the noninteractive singleton instance.
Example:
>>> with PYME.warnings.noninteractive: >>> # do something that might trigger a warning >>> # warning will be logged, but no GUI popup will be shown
- PYME.pyme_warnings.warn(message, category=None, stacklevel=1, allow_cancel=False)¶