B YI~d#�@s�ddlZddlZddlmZmZddlmZmZmZm Z m Z ddlm Z m Z m Z mZmZmZmZmZmZmZddlmZdd�ZGdd �d e�Zed kr�dd lmZed d dd�ddlmZee�dS)�N)�python_version� architecture)�Toplevel�Frame�Label�Button� PhotoImage) �SUNKEN�TOP�BOTTOM�LEFT�X�BOTH�W�EW�NSEW�E)�textviewcCs2tjdkrtjdkrdSdSt�ddd�SdS)N�darwinlZ64Z32r�)�sys�platform�maxsizer�rr�7/opt/alt/python37/lib64/python3.7/idlelib/help_about.py� build_bitss rc@sreZdZdddd�dd�Zdd�Zdd �Zd d �Zd d �Zdd�Zdd�Z dd�Z dd�Z ddd�Z ddd�Z dS)� AboutDialogNF)�_htest�_utestcCs�t�||�|jdd�|�d|��d|��|s6dndf�d|_d|_|��|j ddd �|� |p�d t ��d t ��d ��|� |�|��|�d |j�||_|j��|�d|j�|�d|j�d|_||_|s�|��|��dS)N�)� borderwidthz+%d+%d��dz#bbbbbbz#000000F)�height�widthz About IDLE z (z bit)ZWM_DELETE_WINDOWzz)r�__init__Z configureZgeometryZ winfo_rootxZ winfo_rooty�bg�fg�create_widgetsZ resizable�titlerrZ transientZgrab_setZprotocol�ok�parent� button_okZ focus_setZbind�_current_textviewrZ deiconifyZ wait_window)�selfr+r)rrrrrr%s.     zAboutDialog.__init__cCs�t|dtd�}t|�}|jttd�|jtdtd�t|d|jd�|_ |j jddd �t||j d �}|jdtd �t |d |j |j d d�}|j ddtddd�|j�dd�}|dkr�dnd}tj�tj�tj�t��dd|���}t|��|d�|_t ||j|j d�}|j ddtdddd�d} t || t|j |j d�} | j ddtdddd�t |d t|j |j d�} | j d!ddtddd"�t |d#t�dd�d$t|j |j d�} | j d%ddtddd"�t|d&td|j d'�j d(dtdddd�t |d)t�|j |j d*�} | j d+dtddd�t |d,||j |j d*�}|j d+d&tddd�t||j d �}|j dddtd-�t|d.d(|j |jd/�|_ |j jtddd0�t|d1d(|j |j!d/�|_"|j"jtddd0�t|d2d(|j |j#d/�|_$|j$jtddd0�t|d&td|j d'�j d3dtdddd�t |d4t�|j |j d*�}|j d5dtddd�t||j d �}|j d6ddtd-�t|d7d(|j |j%d/�|_&|j&jtddd0�t|d8d(|j |j'd/�|_(|j(jtddd0�t|d2d(|j |j)d/�|_*|j*jtddd0�dS)9Nr)r �relief)�side�fillT)r0�expandr1ZClose)�text�commandr)�padx�pady)r&)r2r1ZIDLE)Zcourier�Zbold)r3r'r&Zfontr� )�row�column�stickyr5r6�infoZ patchlevelz8.6z.pngz.gifZIconsZidle_48)Zmaster�file)Zimager&)r9r:r;Zrowspanr5r6z=Python's Integrated Development and Learning Environment )r3Zjustifyr'r&�)r9r:r;� columnspanr5r6zemail: [email protected]�)r9r:r?r;r5r6zhttps://docs.python.org/z/library/idle.html��)r r/r#r&�zPython version: )r3r'r&� z Tk version: )r9r:r?r;ZLicense)r3r$Zhighlightbackgroundr4)r0r5r6Z CopyrightZCredits� zIDLE version: � � ZREADMEZNEWS)+rr �packr r r rrr*r,r&rr'ZgridrZtkZcall�os�path�join�abspath�dirname�__file__rZ_rootZ icon_imagerr rrr�show_py_licenseZ py_license�show_py_copyrightZ py_copyright�show_py_creditsZ py_credits� show_readmeZreadme�show_idle_newsZ idle_news�show_idle_creditsZ idle_credits)r.�frameZ frame_buttonsZframe_background�headerZ tk_patchlevelZextZiconZlogoZ byline_textZbylineZemailZdocsZpyverZtkverZ py_buttonsZidleverZ idle_buttonsrrrr(<s�            zAboutDialog.create_widgetscCs|�dt�dS)NzAbout - License)�display_printer_text�license)r.rrrrO�szAboutDialog.show_py_licensecCs|�dt�dS)NzAbout - Copyright)rW� copyright)r.rrrrP�szAboutDialog.show_py_copyrightcCs|�dt�dS)NzAbout - Python Credits)rW�credits)r.rrrrQ�szAboutDialog.show_py_creditscCs|�ddd�dS)NzAbout - Creditsz CREDITS.txtzutf-8)�display_file_text)r.rrrrT�szAboutDialog.show_idle_creditscCs|�ddd�dS)NzAbout - Readmez README.txt�ascii)r[)r.rrrrR�szAboutDialog.show_readmecCs|�ddd�dS)Nz About - NEWSzNEWS.txtzutf-8)r[)r.rrrrS�szAboutDialog.show_idle_newscCs.|��d�|j�}tj||||jd�|_dS)N� )r)�_Printer__setuprK�_Printer__linesrZ view_textrr-)r.r)Zprinterr3rrrrW�s z AboutDialog.display_printer_textcCs:tj�tj�tj�t��|�}tj|||||jd�|_ dS)N)r) rIrJrKrLrMrNrZ view_filerr-)r.r)�filename�encoding�fnrrrr[�szAboutDialog.display_file_textcCs|��|��dS)N)Z grab_releaseZdestroy)r.Zeventrrrr*�szAboutDialog.ok)N)N)N)�__name__� __module__� __qualname__r%r(rOrPrQrTrRrSrWr[r*rrrrrs"V r�__main__)�mainz!idlelib.idle_test.test_help_aboutrF)� verbosity�exit)�run)rIrrrrZtkinterrrrrrr r r r r rrrrrZidlelibrrrrcZunittestrgZidlelib.idle_test.htestrjrrrr�s0 5