File: //usr/lib64/python2.7/idlelib/help.pyc
�
{fc           @   sT  d  Z  d d l m Z d d l m Z m Z m Z m Z m Z d d l m	 Z	 d d l
 m Z m Z m
 Z
 m Z m Z m Z m Z d d l Z d d l m Z e Z e r� d d l m Z n  d	 e f d
 �  �  YZ d e f d �  �  YZ d
 e
 f d �  �  YZ d e f d �  �  YZ d �  Z d �  Z e d k rPd d l  m! Z! e! e � n  d S(   s   help.py: Implement the Idle help menu.
Contents are subject to revision at any time, without notice.
Help => About IDLE: diplay About Idle dialog
<to be moved here from aboutDialog.py>
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 - Parse help.html and render to tk Text.
HelpText - Display formatted help.html.
HelpFrame - Contain text, scrollbar, and table-of-contents.
(This will be needed for display in a future tabbed 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.
i����(   t
   HTMLParser(   t   abspatht   dirnamet   isdirt   isfilet   join(   t   python_version(   t   Tkt   Toplevelt   Framet   Textt	   Scrollbart   Menut
   MenubuttonN(   t   idleConf(   R
   t
   HelpParserc           B   sG   e  Z d  Z d �  Z d d � Z d �  Z d �  Z d �  Z d �  Z RS(   s~  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.
    c         C   s}   t  j |  � | |  _ d |  _ d |  _ t |  _ t |  _ d |  _ t |  _	 d |  _
 t |  _ t |  _ g  |  _
 d |  _ d  S(   Nt    i    (   R    t   __init__t   textt   tagst   chartagst   Falset   showt   hdrlinkt   levelt   pret   hprefixt	   nested_dlt
   simplelistt   toct   header(   t   selfR   (    (    s$   /usr/lib64/python2.7/idlelib/help.pyR   4   s    
											i   c         C   s>