+ self.old_stdout.write("getText: ENTERING\n")
+ val = self.io.getvalue()
+ # looks like there is no other way
+ # to empty the StringIO
+ del self.io
+ self.io = StringIO()
+ self.old_stdout.write("getText: GOT VALUE\n")
+ self.old_stdout.write(val + "\n")
+ return val