%PDF- %PDF-
Direktori : /usr/local/lib/python3.8/idlelib/__pycache__/ |
Current File : //usr/local/lib/python3.8/idlelib/__pycache__/help.cpython-38.pyc |
U qaK. @ s d Z ddlmZ ddlmZmZmZmZ ddlm Z ddl mZmZm Z ddlmZmZmZmZ ddl mZ ddlmZ G d d d eZG dd deZG d d deZG dd deZdd Zdd ZedkrddlmZ edddd ddl m!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)abspathdirnameisfilejoin)python_version)ToplevelTextMenu)Frame Menubutton ScrollbarStylefont)idleConfc @ s: e Zd ZdZdd ZdddZdd 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__texttagschartagsshowhdrlinklevelprehprefix nested_dl simplelisttocheaderprevtag)selfr r# (/usr/local/lib/python3.8/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"