diff -r 2993f566c82e Lib/idlelib/PyShell.py --- a/Lib/idlelib/PyShell.py Mon Jul 09 21:07:41 2012 +0200 +++ b/Lib/idlelib/PyShell.py Mon Jul 09 14:23:27 2012 -0500 @@ -1266,7 +1266,7 @@ def write(self, s): if not isinstance(s, basestring): - raise TypeError('must be str, not ' + type(s).__name__) + raise TypeError('expected a character buffer object') self.shell.write(s, self.tags) def writelines(self, lines): diff -r 2993f566c82e Lib/idlelib/run.py --- a/Lib/idlelib/run.py Mon Jul 09 21:07:41 2012 +0200 +++ b/Lib/idlelib/run.py Mon Jul 09 14:23:27 2012 -0500 @@ -264,7 +264,7 @@ def write(self, s): if not isinstance(s, basestring): - raise TypeError('must be str, not ' + type(s).__name__) + raise TypeError('expected a character buffer object') return self.rpc.write(s) class MyHandler(rpc.RPCHandler):