Python hacking

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

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.