def log_cursor(f):
 def wrapper(*a, **kw):
  try:
   SimpleCursorBase.execute = _execute
   ret = f(*a, **kw)
  finally:
   del SimpleCursorBase.execute
  return ret
 return wrapper

def log_cursor ( f ) : def wrapper ( * a , ** kw ) : try : SimpleCursorBase . execute = _execute ret = f ( * a , ** kw ) finally : del SimpleCursorBase . execute return ret return wrapper
prints sql and params to stdout .