summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/help_about.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib/help_about.py')
-rw-r--r--Lib/idlelib/help_about.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/idlelib/help_about.py b/Lib/idlelib/help_about.py
index 64b13ac..019aacb 100644
--- a/Lib/idlelib/help_about.py
+++ b/Lib/idlelib/help_about.py
@@ -10,6 +10,8 @@ from tkinter import SUNKEN, TOP, BOTTOM, LEFT, X, BOTH, W, EW, NSEW, E
from idlelib import textview
+version = python_version()
+
def build_bits():
"Return bits for platform."
@@ -42,7 +44,7 @@ class AboutDialog(Toplevel):
self.create_widgets()
self.resizable(height=False, width=False)
self.title(title or
- f'About IDLE {python_version()} ({build_bits()} bit)')
+ f'About IDLE {version} ({build_bits()} bit)')
self.transient(parent)
self.grab_set()
self.protocol("WM_DELETE_WINDOW", self.ok)
@@ -88,8 +90,8 @@ class AboutDialog(Toplevel):
email = Label(frame_background, text='email: idle-dev@python.org',
justify=LEFT, fg=self.fg, bg=self.bg)
email.grid(row=6, column=0, columnspan=2, sticky=W, padx=10, pady=0)
- docs = Label(frame_background, text='https://docs.python.org/' +
- python_version()[:3] + '/library/idle.html',
+ docs = Label(frame_background, text="https://docs.python.org/"
+ f"{version[:version.rindex('.')]}/library/idle.html",
justify=LEFT, fg=self.fg, bg=self.bg)
docs.grid(row=7, column=0, columnspan=2, sticky=W, padx=10, pady=0)
@@ -98,7 +100,7 @@ class AboutDialog(Toplevel):
columnspan=3, padx=5, pady=5)
pyver = Label(frame_background,
- text='Python version: ' + python_version(),
+ text='Python version: ' + version,
fg=self.fg, bg=self.bg)
pyver.grid(row=9, column=0, sticky=W, padx=10, pady=0)
tkver = Label(frame_background, text='Tk version: ' + tk_patchlevel,
@@ -124,7 +126,7 @@ class AboutDialog(Toplevel):
columnspan=3, padx=5, pady=5)
idlever = Label(frame_background,
- text='IDLE version: ' + python_version(),
+ text='IDLE version: ' + version,
fg=self.fg, bg=self.bg)
idlever.grid(row=12, column=0, sticky=W, padx=10, pady=0)
idle_buttons = Frame(frame_background, bg=self.bg)