Skip to content

Instantly share code, notes, and snippets.

View lclarkmichalek's full-sized avatar

Laurie Clark-Michalek lclarkmichalek

View GitHub Profile
@lclarkmichalek
lclarkmichalek / fsfds.py
Created June 15, 2011 19:32 — forked from anonymous/fsfds.py
debugging context manager
import time, logging
class debug_watch:
def __init__(self, name, logger=logging.info):
self.name = name
self.logger = logger
def __enter__(self):
self.t = time.time()
self.logger("Starting %s" % self.name)