changeset: 88641:bcfbab86f49a branch: 2.7 user: Terry Jan Reedy date: Thu Jan 23 00:36:37 2014 -0500 files: Lib/idlelib/EditorWindow.py Misc/ACKS Misc/NEWS description: Issue #17390: Add Python version to Idle editor window title bar. Original patches by Edmond Burnett and Kent Johnson. diff -r 751371dd4d1c -r bcfbab86f49a Lib/idlelib/EditorWindow.py --- a/Lib/idlelib/EditorWindow.py Thu Jan 23 00:11:04 2014 +0000 +++ b/Lib/idlelib/EditorWindow.py Thu Jan 23 00:36:37 2014 -0500 @@ -1,5 +1,6 @@ import sys import os +from platform import python_version import re import imp from Tkinter import * @@ -965,11 +966,14 @@ self.undo.reset_undo() def short_title(self): + pyversion = "Python " + python_version() + ": " filename = self.io.filename if filename: filename = os.path.basename(filename) + else: + filename = "Untitled" # return unicode string to display non-ASCII chars correctly - return self._filename_to_unicode(filename) + return pyversion + self._filename_to_unicode(filename) def long_title(self): # return unicode string to display non-ASCII chars correctly diff -r 751371dd4d1c -r bcfbab86f49a Misc/ACKS --- a/Misc/ACKS Thu Jan 23 00:11:04 2014 +0000 +++ b/Misc/ACKS Thu Jan 23 00:36:37 2014 -0500 @@ -145,6 +145,7 @@ Dick Bulterman Bill Bumgarner Jimmy Burgett +Edmond Burnett Tommy Burnette Roger Burnham Alastair Burt diff -r 751371dd4d1c -r bcfbab86f49a Misc/NEWS --- a/Misc/NEWS Thu Jan 23 00:11:04 2014 +0000 +++ b/Misc/NEWS Thu Jan 23 00:36:37 2014 -0500 @@ -183,6 +183,9 @@ IDLE ---- +- Issue #17390: Add Python version to Idle editor window title bar. + Original patches by Edmond Burnett and Kent Johnson. + - Issue #20058: sys.stdin.readline() in IDLE now always returns only one line. - Issue #19481: print() of unicode, str or bytearray subclass instance in IDLE