diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2014-08-15 01:55:01 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2014-08-15 01:55:01 (GMT) |
commit | 6afc2250b3febc18f8f64e0b146da9c10ccb3a1d (patch) | |
tree | 495a5ba4aee9b36252052d0d31f7dd230ece89f0 /Lib/idlelib | |
parent | d7728cafc585b554d347250afd923740432dac5a (diff) | |
parent | 0726ddf44903ddcc02c7147c3a2750ea8e6bac22 (diff) | |
download | cpython-6afc2250b3febc18f8f64e0b146da9c10ccb3a1d.zip cpython-6afc2250b3febc18f8f64e0b146da9c10ccb3a1d.tar.gz cpython-6afc2250b3febc18f8f64e0b146da9c10ccb3a1d.tar.bz2 |
Merge with 3.4
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/EditorWindow.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 94cf314..2855347 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -2,7 +2,7 @@ import importlib import importlib.abc import importlib.util import os -from platform import python_version +import platform import re import string import sys @@ -26,6 +26,8 @@ from idlelib import macosxSupport # The default tab setting for a Text widget, in average-width characters. TK_TABWIDTH_DEFAULT = 8 +_py_version = ' (%s)' % platform.python_version() + def _sphinx_version(): "Format sys.version_info to produce the Sphinx version string used to install the chm docs" major, minor, micro, level, serial = sys.version_info @@ -944,7 +946,7 @@ class EditorWindow(object): short = self.short_title() long = self.long_title() if short and long: - title = short + " - " + long + title = short + " - " + long + _py_version elif short: title = short elif long: @@ -968,14 +970,13 @@ class EditorWindow(object): 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 pyversion + self._filename_to_unicode(filename) + return self._filename_to_unicode(filename) def long_title(self): # return unicode string to display non-ASCII chars correctly |