def new_print(*args, **kwargs): snaptrace.pause() io = StringIO() kwargs["file"] = io self.system_print(*args, **kwargs) self.add_instant("print", {"string": io.getvalue()}) snaptrace.resume()
def ignore_wrapper(*args, **kwargs): snaptrace.pause() ret = func(*args, **kwargs) snaptrace.resume() return ret