Saving to a file added both the filename and repeated the version.
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
- 2014: Saimadhav Heblikar
- 2015: Mark Roseman
- 2017: Louie Lu, Cheryl Sabella, and Serhiy Storchaka
+- 2025: Stan Ulbrych
For additional details refer to NEWS.txt and Changelog.
# The default tab setting for a Text widget, in average-width characters.
TK_TABWIDTH_DEFAULT = 8
-_py_version = ' (%s)' % platform.python_version()
darwin = sys.platform == 'darwin'
def _sphinx_version():
def saved_change_hook(self):
short = self.short_title()
long = self.long_title()
+ _py_version = ' (%s)' % platform.python_version()
if short and long and not macosx.isCocoaTk():
# Don't use both values on macOS because
# that doesn't match platform conventions.
title = short + " - " + long + _py_version
elif short:
- title = short
+ if short == "IDLE Shell":
+ title = short + " " + platform.python_version()
+ else:
+ title = short + _py_version
elif long:
title = long
else:
"Test outwin, coverage 76%."
from idlelib import outwin
+import platform
import sys
import unittest
from test.support import requires
self.assertFalse(w.ispythonsource(__file__))
def test_window_title(self):
- self.assertEqual(self.window.top.title(), 'Output')
+ self.assertEqual(self.window.top.title(), 'Output' + ' (%s)' % platform.python_version())
def test_maybesave(self):
w = self.window
import linecache
import os
import os.path
-from platform import python_version
import re
import socket
import subprocess
class PyShell(OutputWindow):
from idlelib.squeezer import Squeezer
- shell_title = "IDLE Shell " + python_version()
+ shell_title = "IDLE Shell"
# Override classes
ColorDelegator = ModifiedColorDelegator
--- /dev/null
+Deduplicate version number in IDLE shell title bar after saving to a file.