maybe a stupid question  why are not you not using the decorator instead of the contextmanager  given the current with statement encompasses all the method  edit  doh  nevermind  just saw good dan s point in ps 