cpython: 09ebed6a8cb8 (original) (raw)

--- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -7,8 +7,8 @@ What's New in IDLE 3.6.0a1?

rename from Lib/idlelib/idle.html rename to Lib/idlelib/help.html

--- a/Lib/idlelib/help.py +++ b/Lib/idlelib/help.py @@ -1,23 +1,26 @@ -""" -help.py implements the Idle help menu and is subject to change. +""" help.py: Implement the Idle help menu. +Contents are subject to revision at any time, without notice. -The contents are subject to revision at any time, without notice. Help => About IDLE: diplay About Idle dialog -Help => IDLE Help: display idle.html with proper formatting + +Help => IDLE Help: Display help.html with proper formatting. +Doc/library/idle.rst (Sphinx)=> Doc/build/html/library/idle.html +(help.copy_strip)=> Lib/idlelib/help.html -HelpParser - Parses idle.html generated from idle.rst by Sphinx -and renders to tk Text. +HelpParser - Parse help.html and and render to tk Text. -HelpText - Displays formatted idle.html. +HelpText - Display formatted help.html. -HelpFrame - Contains text, scrollbar, and table-of-contents. +HelpFrame - Contain text, scrollbar, and table-of-contents. (This will be needed for display in a future tabbed window.) -HelpWindow - Display idleframe in a standalone window. +HelpWindow - Display HelpFrame in a standalone window. + +copy_strip - Copy idle.html to help.html, rstripping each line. show_idlehelp - Create HelpWindow. Called in EditorWindow.help_dialog. """ @@ -36,7 +39,7 @@ if use_ttk:

IDLE Help ##

class HelpParser(HTMLParser):

The overridden handle_xyz methods handle a subset of html tags. The supplied text should have the needed tag configurations. @@ -62,7 +65,7 @@ class HelpParser(HTMLParser): self.tags = '' if self.level == 0 else 'l'+str(self.level) def handle_starttag(self, tag, attrs):

@@ -120,7 +123,7 @@ class HelpParser(HTMLParser): self.text.insert('end', s, self.tags) def handle_endtag(self, tag):

@@ -136,7 +139,7 @@ class HelpParser(HTMLParser): self.indent(amt=-1) def handle_data(self, data):

@@ -149,7 +152,7 @@ class HelpParser(HTMLParser): class HelpText(Text):

@@ -188,6 +191,7 @@ class HelpText(Text): class HelpFrame(Frame):

@@ -202,6 +206,7 @@ class HelpFrame(Frame): toc.grid(column=0, row=0, sticky='nw') def contents_widget(self, text):

@@ -211,7 +216,7 @@ class HelpFrame(Frame): class HelpWindow(Toplevel): -

@@ -221,11 +226,23 @@ class HelpWindow(Toplevel): self.grid_rowconfigure(0, weight=1) +def copy_strip():

+ def show_idlehelp(parent):

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -81,10 +81,13 @@ Library IDLE ---- +- Issue #24861: Most of idlelib is private and subject to change.