Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 107

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 234

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 235

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 236

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 237

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 238

Warning: Cannot modify header information - headers already sent by (output started at /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php:1) in /home/zoomride2022/public_html/myzoomride.com/wp-includes/certificates/system.php on line 239
U i_-@sdZddlmZddlmZmZmZmZddlm Z ddl m Z m Z m Z mZddlmZmZddl mZddlmZGd d d eZGd d d e ZGd dde ZGddde ZddZddZedkrddlmZeddddddlm Z e edS)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 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)ToplevelFrameTextMenu) Menubutton Scrollbarfont)idleConfc@s:eZdZdZddZdddZddZd d Zd d 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. cCs`tj|dd||_d|_d|_d|_d|_d|_d|_d|_ d|_ d|_ g|_ d|_ d|_dS)NT)Zconvert_charrefsFr)r__init__texttagschartagsshowhdrlinklevelprehprefix nested_dl simplelisttocheaderprevtag)selfrr"+/opt/python38/lib/python3.8/idlelib/help.pyr3szHelpParser.__init__cCs0|j|7_|jdkrdn dt|j|_dS)z#Change indent (+1, 0, -1) and tags.rrlN)rstrr)r!Zamtr"r"r#indentCszHelpParser.indentcCs8d}|D]\}}|dkr|}qd}|dkr<|dkr|dkr||_ n,|d kr |jrd|_|j dd ||_ |jr*|j d||j |jfd|f|_d!S)"zHandle starttags in help.html.rclassZdivsectionTZ sphinxsidebarFprzend-1c linestartzend-1cz  spanrZversionmodifiedem)ulolZsimpleZdlZliz * z * ZdtddendpreblockaZ headerlinkh1)h2h3N)rr rgetisspacerfindrr'rrrinsertrrr)r!tagZattrsclass_r4vsZlastliner"r"r#handle_starttagHsh                zHelpParser.handle_starttagcCs|dkr^|jdkst|jrV|dkr(dn|dkr4dnd}|j||j|jdfd|_nH|d krnd|_ n8|d kr~d |_ n(|d krd |_ d|_n|d kr| dd |f|_ dS)zHandle endtags in help.html.r5r6r7rr7z r6z rr;)r,r-r4Fr)r.r1r/r0N)rAssertionErrorrrappendrrindexrrrrr'r )r!r<r'r"r"r# handle_endtags&   zHelpParser.handle_endtagcCs|jr|js|jr|n |dd}|jdkr`z|d|d|_Wntk r^d|_YnX|jdkr|jdkr|dt|j|jkr|t|jd}|j | 7_ |j d||j|j fdS) z"Handle date segments in help.html.r+ r5rrrANr2)rrrreplacerrDr ValueErrorlenrstriprr;r)r!datadr"r"r# handle_datas     zHelpParser.handle_dataN)r$) __name__ __module__ __qualname____doc__rr'r@rErMr"r"r"r#r*s  :rc@s eZdZdZddZddZdS)HelpTextzDisplay help.html.c Csvtjddddd}tjddddd}d|d}tj||d d d d ||d |d ddg}|dddg}|df|d<|jd|ddfd|jd|ddfd|jd|ddfd|jd|ddfd|jd|dfd d!|jd"|d#fd$d%d&d'd(|jd)d$d$d*|jd+d,d,d*|jd-d.d.d*|jd/d0d0d*t||_t|d1d2}| }W5QRX|j |d3|d4<d5S)6z'Configure tags and feed file to parser.mainZ EditorWindowwidthint)typeheightZwordr)wrapZhighlightthicknessZpadx borderwidthrTrWZ TkDefaultFontZarialZ helveticaZ TkFixedFontZmonacoZcourier rr-Zitalicrr5Zboldr6r7rz#f6f6ff)r backgroundr3 r$Zsolidz#eeffcc)rlmargin1r\Zreliefral1)rdZlmargin2l22l3Kl4dzutf-8)encodingdisabledstateN) rZ GetOptionr rfindfontZ tag_configurerparseropenreadZfeed) r!parentfilenameZuwideZuhighZ normalfontZ fixedfontfcontentsr"r"r#rs>     zHelpText.__init__cCsr|D]h}|ddtj|dDkrFtj|d|d}|dS|ddtj|dDkr|SqdS) z4Return name of first font family derived from names.css|]}|VqdSNlower.0xr"r"r# sz$HelpText.findfont..)rootT)nameexistsr~familycss|]}|VqdSrwrxrzr"r"r#r}sN)rytkfontnamesZFontactualfamilies)r!rrrr"r"r#ros  zHelpText.findfontN)rNrOrPrQrror"r"r"r#rRsrRc@s eZdZdZddZddZdS) HelpFramez&Display html text, scrollbar, and toc.cCst||t|||_}|d|d<|||_}t||jd|_}|j |d<|j ddd|j ddd|j dddd|j ddd d|j dd d ddS) Nra)commandZyscrollcommandrr$ZweightZnw)rowcolumnstickynsewns) r rrRrtoc_menurr yviewscrollsetZ rowconfigureZcolumnconfiguregrid)r!rsrtrrrr"r"r#rs   zHelpFrame.__init__csPt|dd}t|dd}jjD]"\}}|j||ffdd dq ||d<|S) z+Create table of contents as drop-down menu.ZTOCrF)Ztearoffcs |Srw)r)dexrr"r#z$HelpFrame.toc_menu..)ZlabelrZmenu)r r rprZ add_command)r!rrZdropZlblrr"rr#rs   zHelpFrame.toc_menuN)rNrOrPrQrrr"r"r"r#rsrc@seZdZdZddZdS) HelpWindowz!Display frame with rendered html.cCsZt|||||d|jt||jdddd|jddd|jddddS)NZWM_DELETE_WINDOWrr)rrrr$r) rrZwm_titleprotocolZdestroyrrZgrid_columnconfigureZgrid_rowconfigure)r!rsrttitler"r"r#rs   zHelpWindow.__init__N)rNrOrPrQrr"r"r"r#rsrc Csttttttddddd}ttttd}t|d8}t|d"}|D]}||d qPW5QRXW5QRXt|d |d S) a^Copy idle.html to idlelib/help.html, stripping trailing whitespace. Files with trailing whitespace cannot be pushed to the git cpython repository. For 3.x (on Windows), help.html is generated, after editing idle.rst on the master branch, with sphinx-build -bhtml . build/html python_d.exe -c "from idlelib.help import copy_strip; copy_strip()" Check build/html/library/idle.html, the help.html diff, and the text displayed by Help => IDLE Help. Add a blurb and create a PR. It can be worthwhile to occasionally generate help.html without touching idle.rst. Changes to the master version and to the doc build system may result in changes that should not changed the displayed text, but might break HelpParser. As long as master and maintenance versions of idle.rst remain the same, help.html can be backported. The internal Python version number is not displayed. If maintenance idle.rst diverges from the master version, then instead of backporting help.html from master, repeat the procedure above to generate a maintenance version. ZDocZbuildZhtmlZlibraryz idle.html help.htmlrbwb z copied to N)rrr__file__rqwriterstripprint)srcdstZinnoutliner"r"r# copy_strips (rcCs4ttttd}t|sdSt||dtdS)z7Create HelpWindow; called from Idle Help event handler.rNzIDLE Help (%s))rrrrrrr)rsrtr"r"r# show_idlehelpsr__main__)rSzidlelib.idle_test.test_helprF) verbosityexit)runN)!rQZ html.parserrZos.pathrrrrplatformrtkinterrr r r Z tkinter.ttkr r rrZidlelib.configrrrRrrrrrNZunittestrSZidlelib.idle_test.htestrr"r"r"r#s$    ~*