Hacked By AnonymousFox
B
� f�- � @ s� d Z ddlmZ ddlmZmZmZmZ ddlm Z ddl
mZmZm
Z
mZ ddlmZmZ ddl
mZ ddlmZ G d d
� d
e�ZG dd� de
�ZG d
d� de�ZG dd� de�Zdd� Zdd� Zedkr�ddlmZ edddd� ddlm Z e e� dS )a help.py: Implement the Idle help menu.
Contents are subject to revision at any time, without notice.
Help => About IDLE: display About Idle dialog
<to be moved here from help_about.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.
� )�
HTMLParser)�abspath�dirname�isfile�join)�python_version)�Toplevel�Frame�Text�Menu)�
Menubutton� Scrollbar)�font)�idleConfc @ s: e Zd ZdZdd� Zddd�Zdd� Zd d
� Zdd� Zd
S )�
HelpParsera~ 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| dd� || _d| _d| _d| _d| _d| _d| _d| _ d| _
d| _g | _d| _
d | _d S )NT)Zconvert_charrefs� Fr )r �__init__�text�tags�chartags�show�hdrlink�level�pre�hprefix� nested_dl�
simplelist�toc�header�prevtag)�selfr � r! �1/opt/alt/python37/lib64/python3.7/idlelib/help.pyr 3 s zHelpParser.__init__� c C s0 | j |7 _ | j dkrdndt| j � | _dS )z#Change indent (+1, 0, -1) and tags.r r �lN)r �strr )r Zamtr! r! r"