diff options
| author | Ronald Oussoren <ronaldoussoren@mac.com> | 2024-01-06 06:23:26 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-06 06:23:26 (GMT) |
| commit | 66f39648154214621d388f519210442d5fce738f (patch) | |
| tree | 9045099ced4fce7642e96df2cf529dd28768b58c /Lib/idlelib/help.py | |
| parent | d0f0308a373298a8906ee5a7546275e1b2e906ea (diff) | |
| download | cpython-66f39648154214621d388f519210442d5fce738f.zip cpython-66f39648154214621d388f519210442d5fce738f.tar.gz cpython-66f39648154214621d388f519210442d5fce738f.tar.bz2 | |
gh-113729: Fix IDLE's Help -> "IDLE Help" menu bug in 3.12.1 and 3.11.7 (#113731)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Lib/idlelib/help.py')
| -rw-r--r-- | Lib/idlelib/help.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Lib/idlelib/help.py b/Lib/idlelib/help.py index 3cc7e36..dfccfcb 100644 --- a/Lib/idlelib/help.py +++ b/Lib/idlelib/help.py @@ -241,12 +241,13 @@ class HelpWindow(Toplevel): Toplevel.__init__(self, parent) self.wm_title(title) self.protocol("WM_DELETE_WINDOW", self.destroy) - HelpFrame(self, filename).grid(column=0, row=0, sticky='nsew') + self.frame = HelpFrame(self, filename) + self.frame.grid(column=0, row=0, sticky='nsew') self.grid_columnconfigure(0, weight=1) self.grid_rowconfigure(0, weight=1) -def copy_strip(): +def copy_strip(): # pragma: no cover """Copy idle.html to idlelib/help.html, stripping trailing whitespace. Files with trailing whitespace cannot be pushed to the git cpython @@ -279,13 +280,13 @@ def copy_strip(): print(f'{src} copied to {dst}') -def _helpwindow(parent): +def show_idlehelp(parent): "Create HelpWindow; called from Idle Help event handler." filename = join(abspath(dirname(__file__)), 'help.html') - if not isfile(filename): + if not isfile(filename): # pragma: no cover # Try copy_strip, present message. return - HelpWindow(parent, filename, 'IDLE Help (%s)' % python_version()) + return HelpWindow(parent, filename, 'IDLE Doc (%s)' % python_version()) if __name__ == '__main__': @@ -293,4 +294,4 @@ if __name__ == '__main__': main('idlelib.idle_test.test_help', verbosity=2, exit=False) from idlelib.idle_test.htest import run - run(_helpwindow) + run(show_idlehelp) |
