verbosity.py

Global verbosity settings and helper functions.

The idea is to set the settings in the main file of the script and have that information available everywhere without needing to pass boolean flags for verbosity levels and write verbosity level checks everywhere. Instead, use the vprint and dprint functions below.

verbosity.dpprint(*args, **kwargs) → None

Pretty-print if verbosity is switched on. Use exactly as you would use pprint().

verbosity.dprint(*args, **kwargs) → None

Print if verbosity is switched on. Use exactly as you would use print().

verbosity.vpprint(*args, **kwargs) → None

Pretty-print if verbosity is switched on. Use exactly as you would use pprint().

verbosity.vprint(*args, **kwargs) → None

Print if verbosity is switched on. Use exactly as you would use print().