As @AndrewHerzing and I are working to include pyMCR as a decomposition method into HyperSpy, it would be nice if there was a way to prevent the code from outputting to the stdout on the console.
I would recommend one of two methods:
1) Rather than print statements, make use of the logging module, so packages that call this library can set the verbosity of the log as needed
2) Add a quiet parameter throughout the code that when set will prevent outputting to the console (a la most UNIX tools)
Option 1 is more "pythonic", and provides a little more flexibility, so that would be my preferred recommendation.
As @AndrewHerzing and I are working to include
pyMCR
as a decomposition method into HyperSpy, it would be nice if there was a way to prevent the code from outputting to the stdout on the console.I would recommend one of two methods: 1) Rather than
print
statements, make use of thelogging
module, so packages that call this library can set the verbosity of the log as needed 2) Add aquiet
parameter throughout the code that when set will prevent outputting to the console (a la most UNIX tools)Option 1 is more "pythonic", and provides a little more flexibility, so that would be my preferred recommendation.