class_docstr: Render help.html into a text widget.
  
  The overridden handle_xyz methods handle a subset of html tags.
  The supplied text should have the needed tag configurations.
  The behavior for unsupported tags, such as table, is undefined.
  If the tags generated by Sphinx change, this class, especially
  the handle_starttag and handle_endtags methods, might have to also.
class_docstr_tok: ["Render","help.html","into","a","text","widget",".","The","overridden","handle_xyz","methods","handle","a","subset","of","html","tags",".","The","supplied","text","should","have","the","needed","tag","configurations",".","The","behavior","for","unsupported","tags",",","such","as","table",",","is","undefined",".","If","the","tags","generated","by","Sphinx","change",",","this","class",",","especially","the","handle_starttag","and","handle_endtags","methods",",","might","have","to","also","."]
docstr: Handle starttags in help.html.
docstr_tok: ["Handle","starttags","in","help.html","."]
code: def handle_starttag(self, tag, attrs):
      "Handle starttags in help.html."
      class_ = ""
      for a, v in attrs:
          if a == "class":
              class_ = v
      s = ""
      if tag == "section" and attrs == [("id", "idle")]:
          self.show = True  # Start main content.
      elif tag == "div" and class_ == "clearer":
          self.show = False  # End main content.
      elif tag == "p" and self.prevtag and not self.prevtag[0]:
          # Begin a new block for <p> tags after a closed tag.
          # Avoid extra lines, e.g. after <pre> tags.
          lastline = self.text.get("end-1c linestart", "end-1c")
          s = "\n\n" if lastline and not lastline.isspace() else "\n"
      elif tag == "span" and class_ == "pre":
          self.chartags = "pre"
      elif tag == "span" and class_ == "versionmodified":
          self.chartags = "em"
      elif tag == "em":
          self.chartags = "em"
      elif tag in ["ul", "ol"]:
          if class_.find("simple") != -1:
              s = "\n"
              self.simplelist = True
          else:
              self.simplelist = False
          self.indent()
      elif tag == "dl":
          if self.level > 0:
              self.nested_dl = True
      elif tag == "li":
          s = "\n* "
      elif tag == "dt":
          s = (
              "\n\n" if not self.nested_dl else "\n"
          )  # Avoid extra line.
          self.nested_dl = False
      elif tag == "dd":
          self.indent()
          s = "\n"
      elif tag == "pre":
          self.pre = True
          if self.show:
              self.text.insert("end", "\n\n")
          self.tags = "preblock"
      elif tag == "a" and class_ == "headerlink":
          self.hdrlink = True
      elif tag == "h1":
          self.tags = tag
      elif tag in ["h2", "h3"]:
          if self.show:
              self.header = ""
              self.text.insert("end", "\n\n")
          self.tags = tag
      if self.show:
          self.text.insert("end", s, (self.tags, self.chartags))
      self.prevtag = (True, tag)
  
imports: from html.parser import HTMLParser
  from os.path import abspath, dirname, isfile, join
  from platform import python_version
  from tkinter import Toplevel, Text, Menu
  from tkinter.ttk import Frame, Menubutton, Scrollbar, Style
  from tkinter import font
  from idlelib.config import idleConf
label_desc: Use image node_id 3 for calling the HelpParser obj's underlying member method code with example usage: obj.handle_starttag(tag, attrs) without return types