diff -r 713db33a4ebc Lib/idlelib/OutputWindow.py --- a/Lib/idlelib/OutputWindow.py Sat Mar 10 23:43:12 2012 +0100 +++ b/Lib/idlelib/OutputWindow.py Sun Mar 11 21:10:28 2012 -0500 @@ -40,6 +40,7 @@ self.text.insert(mark, s, tags) self.text.see(mark) self.text.update() + return len(s) def writelines(self, lines): for line in lines: diff -r 713db33a4ebc Lib/idlelib/PyShell.py --- a/Lib/idlelib/PyShell.py Sat Mar 10 23:43:12 2012 +0100 +++ b/Lib/idlelib/PyShell.py Sun Mar 11 21:10:28 2012 -0500 @@ -755,7 +755,7 @@ def write(self, s): "Override base class method" - self.tkconsole.stderr.write(s) + return self.tkconsole.stderr.write(s) def display_port_binding_error(self): tkMessageBox.showerror( @@ -1223,7 +1223,7 @@ def write(self, s, tags=()): try: self.text.mark_gravity("iomark", "right") - OutputWindow.write(self, s, tags, "iomark") + count = OutputWindow.write(self, s, tags, "iomark") self.text.mark_gravity("iomark", "left") except: raise ###pass # ### 11Aug07 KBK if we are expecting exceptions @@ -1232,6 +1232,7 @@ self.canceled = 0 if not use_subprocess: raise KeyboardInterrupt + return count class PseudoFile(object): @@ -1241,7 +1242,7 @@ self.encoding = encoding def write(self, s): - self.shell.write(s, self.tags) + return self.shell.write(s, self.tags) def writelines(self, lines): for line in lines: