Your IP : 216.73.216.196


Current Path : /opt/alt/python310/lib64/python3.10/idlelib/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/idlelib/__pycache__/help_about.cpython-310.opt-1.pyc

o

0�i�#�@s�dZddlZddlZddlZddlmZmZddlmZm	Z	m
Z
mZmZddlm
Z
mZmZmZmZmZmZmZmZmZddlmZe�Zdd�ZGd	d
�d
e�ZedkrnddlmZed
ddd�ddlm Z e e�dSdS)zAbout Dialog for IDLE

�N)�python_version�architecture)�Toplevel�Frame�Label�Button�
PhotoImage)
�SUNKEN�TOP�BOTTOM�LEFT�X�BOTH�W�EW�NSEW�E)�textviewcCs.tjdkrtjdkrdSdSt�ddd�S)zReturn bits for platform.�darwinlZ64Z32rN�)�sys�platform�maxsizer�rr�9/opt/alt/python310/lib64/python3.10/idlelib/help_about.py�
build_bitss
rc@sveZdZdZdddd�dd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Zddd�Z
ddd�ZdS)�AboutDialogz!Modal about dialog for idle

    NF)�_htest�_utestcCs�t�||�|jdd�|�d|��d|��|sdndf�d|_d|_|��|j	ddd	�|�
|p?d
t�dt��d��|�
|�|��|�d
|j�||_|j��|�d|j�|�d|j�d|_||_|sy|��|��dSdS)aCreate popup, do not return until tk widget destroyed.

        parent - parent of this dialog
        title - string which is title of popup dialog
        _htest - bool, change box location when running htest
        _utest - bool, don't wait_window when running unittest
        �)�borderwidthz+%d+%d��dz#bbbbbbz#000000F)�height�widthzAbout IDLE z (z bit)ZWM_DELETE_WINDOWz<Return>z<Escape>N)r�__init__Z	configureZgeometryZwinfo_rootxZwinfo_rooty�bg�fg�create_widgetsZ	resizable�title�versionrZ	transientZgrab_setZprotocol�ok�parent�	button_okZ	focus_set�bind�_current_textviewrZ	deiconifyZwait_window)�selfr,r)rrrrrr%s4
��

�zAboutDialog.__init__cs�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"�d#tjdd�}t||t|j|j
d���j
d$ddtddd"���d%�fd&d'��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
dddt!d/�t|d0d*|j
|j"d1�|_#|j#jtddd2�t|d3d*|j
|j$d1�|_%|j%jtddd2�t|d4d*|j
|j&d1�|_'|j'jtddd2�t|d(td|j
d)�j
d5dtdddd�t|d6t |j|j
d,�}|j
d7dtddd�t||j
d
�}|j
d8ddt!d/�t|d9d*|j
|j(d1�|_)|j)jtddd2�t|d:d*|j
|j*d1�|_+|j+jtddd2�t|d4d*|j
|j,d1�|_-|j-jtddd2�dS);Nr)r �relief)�side�fillT)r2�expandr3ZClose)�text�commandr)�padx�pady)r&)r4r3ZIDLE)Zcourier�Zbold)r5r'r&Zfontr�
)�row�column�stickyr7r8�infoZ
patchlevelz8.6z.pngz.gifZIconsZidle_48)Zmaster�file)Zimager&)r;r<r=Zrowspanr7r8z=Python's Integrated Development
and Learning Environment




)r5Zjustifyr'r&�)r;r<r=�
columnspanr7r8zemail:  idle-dev@python.org�)r;r<rAr=r7r8z/https://docs.python.org/%d.%d/library/idle.html�z
<Button-1>cst��d�S)Nr5)�
webbrowser�open)�event�Zdocsrr�<lambda>csz,AboutDialog.create_widgets.<locals>.<lambda>�)r r1r#r&�zPython version:  )r5r'r&�	z
Tk version:  )r;r<rAr=ZLicense)r5r$Zhighlightbackgroundr6)r2r7r8Z	CopyrightZCredits�zIDLE version:   ��
ZREADMEZNEWS).rr	Zpackrr
r
rrr+r-r&rr'ZgridrZtkZcall�os�path�join�abspath�dirname�__file__rZ_rootZ
icon_imagerrr�version_infor.rr*r�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)r0�frameZ
frame_buttonsZframe_background�headerZ
tk_patchlevelZextZiconZlogoZbyline_textZbylineZemailZdocs_urlZpyverZtkverZ
py_buttonsZidleverZidle_buttonsrrGrr(?s��
�
��
��
����
����������zAboutDialog.create_widgetscC�|�dt�dS)zHandle License button event.zAbout - LicenseN)�display_printer_text�license�r0rrrrV��zAboutDialog.show_py_licensecCr^)zHandle Copyright button event.zAbout - CopyrightN)r_�	copyrightrarrrrW�rbzAboutDialog.show_py_copyrightcCr^)z#Handle Python Credits button event.zAbout - Python CreditsN)r_�creditsrarrrrX�rbzAboutDialog.show_py_creditscC�|�ddd�dS)z!Handle Idle Credits button event.zAbout - CreditszCREDITS.txt�utf-8N��display_file_textrarrrr[��zAboutDialog.show_idle_creditscCre)zHandle Readme button event.zAbout - Readmez
README.txt�asciiNrgrarrrrY�rizAboutDialog.show_readmecCre)zHandle News button event.zAbout - NEWSzNEWS.txtrfNrgrarrrrZ�rizAboutDialog.show_idle_newscCs.|��d�|j�}tj||||jd�|_dS)aCreate textview for built-in constants.

        Built-in constants have type _sitebuiltins._Printer.  The
        text is extracted from the built-in and then sent to a text
        viewer with self as the parent and title as the title of
        the popup.
        �
�rN)�_Printer__setuprQ�_Printer__linesrZ	view_textrr/)r0r)Zprinterr5rrrr_�s

�z AboutDialog.display_printer_textcCs:tj�tj�tj�t��|�}tj|||||jd�|_	dS)z�Create textview for filename.

        The filename needs to be in the current directory.  The path
        is sent to a text viewer with self as the parent, title as
        the title of the popup, and the file encoding.
        rlN)
rOrPrQrRrSrTrZ	view_filerr/)r0r)�filename�encoding�fnrrrrh�s�zAboutDialog.display_file_textcCs|��|��dS)zDismiss help_about dialog.N)Zgrab_releaseZdestroy)r0rFrrrr+�szAboutDialog.ok)N)�__name__�
__module__�__qualname__�__doc__r%r(rVrWrXr[rYrZr_rhr+rrrrrs"X

r�__main__)�mainz!idlelib.idle_test.test_help_aboutrF)�	verbosity�exit)�run)!rurOrrDrrrZtkinterrrrrrr	r
rrr
rrrrrZidlelibrr*rrrrZunittestrwZidlelib.idle_test.htestrzrrrr�<module>s$07�