+ def __init__(self, process):
+ self.process = process
+
+ def nextSnapshot(self):
+ image, comment = read_pnm(self.process.stdout)
+ if image is None:
+ return None, None
+
+ callNo = int(comment.strip())
+
+ return image, callNo
+
+ def terminate(self):
+ try:
+ self.process.terminate()
+ except OSError:
+ # Avoid http://bugs.python.org/issue14252
+ pass
+
+
+class Retracer:
+
+ def __init__(self, retraceExe, args, env=None):
+ self.retraceExe = retraceExe