Closed
Description
Is your feature request related to a problem? Please describe.
Cell output sometimes gets spammed with hard coded prints, for example in the append_energy_axis function.
Describe the solution you'd like
I would like for such prints to be implemented using the logging module
Describe alternatives you've considered
I have considered the possibility of removing such prints, or suppressing prints by using
class HiddenPrints:
def __enter__(self):
self._original_stdout = sys.stdout
sys.stdout = open(os.devnull, 'w')
def __exit__(self, exc_type, exc_val, exc_tb):
sys.stdout.close()
sys.stdout = self._original_stdout
and then
with HiddenPrints():
prc.append_energy_axis(calibration = calibration, binwidth=1, binning=0)
but neither of these solutions is ideal, compared to the logging module solution