-What's New in IDLE 3.2.4?
+What's New in IDLE 3.3.0?
=========================
+ - Issue #7163: Propagate return value of sys.stdout.write.
+
- Issue #15318: Prevent writing to sys.stdin.
+- Issue #4832: Modify IDLE to save files with .py extension by
+ default on Windows and OS X (Tk 8.5) as it already does with X11 Tk.
+
- Issue #13532, #15319: Check that arguments to sys.stdout.write are strings.
- Issue # 12510: Attempt to get certain tool tips no longer crashes IDLE.
self.set_line_and_column()
def write(self, s, tags=()):
+ if isinstance(s, str) and len(s) and max(s) > '\uffff':
+ # Tk doesn't support outputting non-BMP characters
+ # Let's assume what printed string is not very long,
+ # find first non-BMP character and construct informative
+ # UnicodeEncodeError exception.
+ for start, char in enumerate(s):
+ if char > '\uffff':
+ break
+ raise UnicodeEncodeError("UCS-2", char, start, start+1,
+ 'Non-BMP character not supported in Tk')
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