changeset: 96109:c473ac171041 branch: 2.7 parent: 96097:6570e4e9b1f3 user: Terry Jan Reedy date: Sat May 16 19:28:27 2015 -0400 files: Lib/idlelib/aboutDialog.py description: Issue #24199: Stop using idelver in aboutdialog. diff -r 6570e4e9b1f3 -r c473ac171041 Lib/idlelib/aboutDialog.py --- a/Lib/idlelib/aboutDialog.py Sat May 16 21:34:56 2015 +0300 +++ b/Lib/idlelib/aboutDialog.py Sat May 16 19:28:27 2015 -0400 @@ -1,12 +1,10 @@ """About Dialog for IDLE """ - +import os +from sys import version from Tkinter import * -import os - from idlelib import textView -from idlelib import idlever class AboutDialog(Toplevel): """Modal about dialog for idle @@ -37,6 +35,7 @@ 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) @@ -63,14 +62,14 @@ 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: '+ @@ -93,7 +92,7 @@ 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)