summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/EditorWindow.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2014-08-15 01:54:38 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2014-08-15 01:54:38 (GMT)
commitc11633eabacba99e3e9fa76113b932b201af16bc (patch)
treefd2afcbded374ffdf489cdb26633f647ed09d587 /Lib/idlelib/EditorWindow.py
parentc95f51a9530440826d6cd8984183eaae8b4bb84c (diff)
downloadcpython-c11633eabacba99e3e9fa76113b932b201af16bc.zip
cpython-c11633eabacba99e3e9fa76113b932b201af16bc.tar.gz
cpython-c11633eabacba99e3e9fa76113b932b201af16bc.tar.bz2
Issue #17390: Adjust Editor window title. Remove 'Python', move version to end.
Diffstat (limited to 'Lib/idlelib/EditorWindow.py')
-rw-r--r--Lib/idlelib/EditorWindow.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 957d550..6ed2f2c 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -1,6 +1,6 @@
import sys
import os
-from platform import python_version
+import platform
import re
import imp
from Tkinter import *
@@ -22,6 +22,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