diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2015-05-16 23:28:32 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2015-05-16 23:28:32 (GMT) |
commit | 296c66e21cf21c2b4eada43432d734e9bccc07b4 (patch) | |
tree | 322fe6b3ec49a2fb138fdb7c39d2342b5c4a50fb /Lib/idlelib/aboutDialog.py | |
parent | a0b8a508c9ae00c1b9f93b9b0a480fa3d2c5ee97 (diff) | |
download | cpython-296c66e21cf21c2b4eada43432d734e9bccc07b4.zip cpython-296c66e21cf21c2b4eada43432d734e9bccc07b4.tar.gz cpython-296c66e21cf21c2b4eada43432d734e9bccc07b4.tar.bz2 |
Issue #24199: Make idlever module self updating. Syop using it in aboutDialog.
Diffstat (limited to 'Lib/idlelib/aboutDialog.py')
-rw-r--r-- | Lib/idlelib/aboutDialog.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Lib/idlelib/aboutDialog.py b/Lib/idlelib/aboutDialog.py index 942562a..d876a97 100644 --- a/Lib/idlelib/aboutDialog.py +++ b/Lib/idlelib/aboutDialog.py @@ -2,12 +2,10 @@ """ -from tkinter import * import os -import sys - +from sys import version +from tkinter import * from idlelib import textView -from idlelib import idlever class AboutDialog(Toplevel): """Modal about dialog for idle @@ -38,6 +36,7 @@ class AboutDialog(Toplevel): self.wait_window() def CreateWidgets(self): + release = version[:version.index(' ')] frameMain = Frame(self, borderwidth=2, relief=SUNKEN) frameButtons = Frame(self) frameButtons.pack(side=BOTTOM, fill=X) @@ -64,14 +63,14 @@ class AboutDialog(Toplevel): labelEmail.grid(row=6, column=0, columnspan=2, sticky=W, padx=10, pady=0) labelWWW = Label(frameBg, text='https://docs.python.org/' + - sys.version[:3] + '/library/idle.html', + version[:3] + '/library/idle.html', justify=LEFT, fg=self.fg, bg=self.bg) labelWWW.grid(row=7, column=0, columnspan=2, sticky=W, padx=10, pady=0) Frame(frameBg, borderwidth=1, relief=SUNKEN, height=2, bg=self.bg).grid(row=8, column=0, sticky=EW, columnspan=3, padx=5, pady=5) - labelPythonVer = Label(frameBg, text='Python version: ' + \ - sys.version.split()[0], fg=self.fg, bg=self.bg) + labelPythonVer = Label(frameBg, text='Python version: ' + + release, fg=self.fg, bg=self.bg) labelPythonVer.grid(row=9, column=0, sticky=W, padx=10, pady=0) tkVer = self.tk.call('info', 'patchlevel') labelTkVer = Label(frameBg, text='Tk version: '+ @@ -94,7 +93,7 @@ class AboutDialog(Toplevel): Frame(frameBg, borderwidth=1, relief=SUNKEN, height=2, bg=self.bg).grid(row=11, column=0, sticky=EW, columnspan=3, padx=5, pady=5) - idle_v = Label(frameBg, text='IDLE version: ' + idlever.IDLE_VERSION, + idle_v = Label(frameBg, text='IDLE version: ' + release, fg=self.fg, bg=self.bg) idle_v.grid(row=12, column=0, sticky=W, padx=10, pady=0) idle_button_f = Frame(frameBg, bg=self.bg) |