I agree. I shoe-horned __del__ for now, but the "return terminal to sane mode" will end up in a finaly: in the context manager instead.