Python‘s had this handy logging module since July 2003. A lot of things use it, so if you’re trying to understand or debug some Python code then a handy snippet to insert somewhere is:
import logging logging.basicConfig(level=1)
Those two lines cause all loggers to log everything to the console. Check out the logging.basicConfig docs to see what else you could do.