Use the logging module for all output rather than print.
Rationale:
is more flexible and can be configured from within user code (for example if the user wants all pymad related log messages to go to a separate output file)
can automatically add time/module and other information to output
has multiple log levels (info, warning, error,.. ) indicating severity of log mesages
bonus feature (probably least important): compatibility between python{2,3} without extra from __future__ import print_function statement
I suggest to write any new output using the logging module. At some point we might want to convert old code.
Use the
logging
module for all output rather thanprint
.Rationale:
from __future__ import print_function
statementI suggest to write any new output using the logging module. At some point we might want to convert old code.