Sometimes I need a simple stop watch in my Python scripts to find out how expensive my code is in wall clock time. The problem is trivial to solve, but I thought I'd give it a try using Python's with statement and a context manager.
Previously, my code looked like …
read more