It is quite hard to identify errors on the command line as everything is printed without coloring.
There are great libraries available, such as the logging library that allows to specify several logging levels. In conjunction with coloredlogs, the command line output would be
It is quite hard to identify errors on the command line as everything is printed without coloring.
There are great libraries available, such as the logging library that allows to specify several logging levels. In conjunction with coloredlogs, the command line output would be
The only changes need to be made are
to wordclock.py' main function. This sets print to be an info message (available levels: DEBUG, INFO, WARNING, ERROR).
coloredlogs can be installed from pypi (pip install coloredlogs) and could be wrapped with a try-catch-block to prevent import errors.