Current File : //usr/local/apps/python3/lib/python3.11/idlelib/__pycache__/help_about.cpython-311.pyc
�

�Ke�#���dZddlZddlZddlZddlmZmZddlmZm	Z	m
Z
mZmZddlm
Z
mZmZmZmZmZmZmZmZmZddlmZe��Zd�ZGd�d	e��Zed
kr'ddlmZedd
d���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)�textviewc��tjdkrtjdkrdndSt��ddd�S)zReturn bits for platform.�darwinl�64�32rN�)�sys�platform�maxsizer���</usr/local/apps/python3/lib/python3.11/idlelib/help_about.py�
build_bitsr s=��
�|�x����{�U�*�*�t�t��4��~�~�a� ��!��$�$rc�b�eZdZdZdddd�d�Zd�Zd�Zd�Zd	�Zd
�Z	d�Z
d�Zd
�Zdd�Z
dd�ZdS)�AboutDialogz!Modal about dialog for idle

    NF)�_htest�_utestc�d�tj||��|�d���|�d|���dz|���|sdndzfz��d|_d|_|���|�	dd�	��|�
|pd
t�dt���d���|�
|��|���|�d
|j��||_|j���|�d|j��|�d|j��d|_||_|s*|���|���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)�WM_DELETE_WINDOWz<Return>z<Escape>N)r�__init__�	configure�geometry�winfo_rootx�winfo_rooty�bg�fg�create_widgets�	resizable�title�versionr �	transient�grab_set�protocol�ok�parent�	button_ok�	focus_set�bind�_current_textviewr$�	deiconify�wait_window)�selfr<r6r#r$s     rr-zAboutDialog.__init__s���	��$��'�'�'����1��%�%�%��
�
�h��*�*�,�,�R�/��*�*�,�,��.G�b�b�C�H�"J�J�	K�	K�	K����������������e�5��1�1�1��
�
�5�@�?��?�?�J�L�L�?�?�?�	A�	A�	A����v�����
�
�����
�
�(�$�'�2�2�2������ � �"�"�"��	�	�*�d�g�&�&�&��	�	�*�d�g�&�&�&�!%�������	��N�N������������	�	rc�r��t|dt���}t|��}|�tt���|�t
dt���t|d|j���|_	|j	�dd�	��t||j
�
��}|�dt���t|d|j|j
d
���}|�
ddtdd���|���}|dkrdnd}t j�t j�t j�t*����dd|����}t-|���|���|_t||j|j
���}|�
ddt2ddd���d}	t||	t4|j|j
���}
|
�
ddt2ddd���t|dt4|j|j
���}|�
dddt2dd� ��d!t6jdd�z}t||t4|j|j
������
d"ddt2dd� ����d#�fd$���t|d%td|j
�&���
d'dt<ddd���t|d(t>z|j|j
�)��}
|
�
d*dt2dd���t|d+|��|j|j
�)��}|�
d*d%t2dd���t||j
�
��}|�
dddt@�,��t|d-d'|j
|j!�.��|_"|j"�t4dd�/��t|d0d'|j
|j#�.��|_$|j$�t4dd�/��t|d1d'|j
|j%�.��|_&|j&�t4dd�/��t|d%td|j
�&���
d2dt<ddd���t|d3t>z|j|j
�)��}|�
d4dt2dd���t||j
�
��}|�
d5ddt@�,��t|d6d'|j
|j'�.��|_(|j(�t4dd�/��t|d7d'|j
|j)�.��|_*|j*�t4dd�/��t|d1d'|j
|j+�.��|_,|j,�t4dd�/��dS)8Nr)r'�relief)�side�fillT)rF�expandrG�Close)�text�commandr&)�padx�pady)r2)rHrG�IDLE)�courier��bold)rJr3r2�fontr�
)�row�column�stickyrLrM)��z.pngz.gif�Icons�idle_48)�master�file)�imager2)rTrUrV�rowspanrLrMz=Python's Integrated Development
and Learning Environment




)rJ�justifyr3r2�)rTrUrV�
columnspanrLrMzemail:  idle-dev@python.orgrX)rTrUrarVrLrMz/https://docs.python.org/%d.%d/library/idle.html�z
<Button-1>c�8��tj�d��S)NrJ)�
webbrowser�open)�event�docss �r�<lambda>z,AboutDialog.create_widgets.<locals>.<lambda>cs���j�o�d�6�l�.K�.K�r�)r'rEr*r2rWzPython version:  )rJr3r2�	z
Tk version:  )rTrUrarV�License)rJr+�highlightbackgroundrK)rFrLrM�	Copyright�Credits�zIDLE version:   ��
�README�NEWS)-rr
�packrrrrrr;r=r2rr3�gridr�info_patchlevel�os�path�join�abspath�dirname�__file__r	�_root�
icon_imagerr
r�version_infor?rr7r�show_py_license�
py_license�show_py_copyright�py_copyright�show_py_credits�
py_credits�show_readme�readme�show_idle_news�	idle_news�show_idle_credits�idle_credits)rC�frame�
frame_buttons�frame_background�header�
tk_patchlevel�ext�icon�logo�byline_text�byline�email�docs_url�pyver�tkver�
py_buttons�idlever�idle_buttonsrgs                  @rr4zAboutDialog.create_widgets?s5����d��&�9�9�9���d���
�����Q��/�/�/�
�
�
��D�t�
�4�4�4��
�G�(,��1�1�1����������+�+�+� ��4�7�3�3�3�����T���5�5�5��'�f����'�(?�A�A�A������!�A�B�R��@�@�@��,�,�.�.�
�%��/�/�f�f�V���w�|�|�B�G�O�O�B�G�O�O�H�,E�,E�F�F�#�_�s�_�_�6�6��$�D�J�J�L�L�t�D�D�D����%�T�_���I�I�I���	�	�a��!�Q�R�b�	�I�I�I�Z���'�k�4��'�d�g�/�/�/������!�A�!�"�1��M�M�M��&�-J�"�t�w�4�7�<�<�<��
�
�
�q��q���!�
�L�L�L�E��$�R�a�R�(�)���%�H�!�d�g�$�'�;�;�;���	�	�a��a����	�K�K�K��	�	�,� K� K� K� K�L�L�L�
��A�f��4�7�	$�	$�	$�$(�D�Q�q��45�A�A�%)�%G�%G�%G��&�.��8���T�W�.�.�.��	�
�
�q��1�2�A�
�>�>�>��&�-L�]�-L�-L���T�W�.�.�.��
�
�
�q��1�1�1�
�=�=�=��+���8�8�8�
����B�q�Q�t��D�D�D� ��)�1�59�W�)-�)=�?�?�?���	
����$�R�b��9�9�9�"�:�K�q�7;�w�+/�+A�C�C�C���	
����D�r���;�;�;� ��)�1�59�W�)-�)=�?�?�?���	
����$�R�b��9�9�9�
��A�f��4�7�	$�	$�	$�$(�D�R��"�45�A�A�%)�%G�%G�%G��(�/�'�9��7�t�w�0�0�0��	����A�a�b�q��A�A�A��-�$�'�:�:�:�����b��q���F�F�F��\���15��%)�%5�7�7�7���	
����d��"��5�5�5���6��48�G�(,�(;�=�=�=���	
�����B�R��8�8�8�"�<�i�q�7;�w�+/�+A�C�C�C���	
����D�r���;�;�;�;�;rc�<�|�dt��dS)zHandle License button event.zAbout - LicenseN)�display_printer_text�license�rCs rr�zAboutDialog.show_py_license�s���!�!�"3�W�=�=�=�=�=rc�<�|�dt��dS)zHandle Copyright button event.zAbout - CopyrightN)r��	copyrightr�s rr�zAboutDialog.show_py_copyright�s���!�!�"5�y�A�A�A�A�Arc�<�|�dt��dS)z#Handle Python Credits button event.zAbout - Python CreditsN)r��creditsr�s rr�zAboutDialog.show_py_credits�s���!�!�":�G�D�D�D�D�Drc�4�|�ddd��dS)z!Handle Idle Credits button event.zAbout - CreditszCREDITS.txt�utf-8N��display_file_textr�s rr�zAboutDialog.show_idle_credits�s!�����0�-��I�I�I�I�Irc�4�|�ddd��dS)zHandle Readme button event.zAbout - Readmez
README.txt�asciiNr�r�s rr�zAboutDialog.show_readme�s!�����/��w�G�G�G�G�Grc�4�|�ddd��dS)zHandle News button event.zAbout - NEWSzNEWS.txtr�Nr�r�s rr�zAboutDialog.show_idle_news�s �����~�z�7�C�C�C�C�Crc��|���d�|j��}tj||||j���|_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.
        �
�r$N)�_Printer__setupry�_Printer__linesr�	view_textr$r@)rCr6�printerrJs    rr�z AboutDialog.display_printer_text�sU��	���!�!�!��y�y��0�1�1��!)�!3��%��d�k�"3�"3�"3����rc�
�tj�tj�tj�t
����|��}t
j|||||j���|_	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.
        r�N)
rwrxryrzr{r|r�	view_filer$r@)rCr6�filename�encoding�fns     rr�zAboutDialog.display_file_text�sb���W�\�\�"�'�/�/�"�'�/�/�(�*C�*C�D�D�h�
O�
O��!)�!3��%��X�d�k�";�";�";����rc�V�|���|���dS)zDismiss help_about dialog.N)�grab_release�destroy)rCrfs  rr;zAboutDialog.ok�s%���������������r)N)�__name__�
__module__�__qualname__�__doc__r-r4r�r�r�r�r�r�r�r�r;rrrr"r"s��������� �U�5� � � � � �DU<�U<�U<�p>�>�>�B�B�B�E�E�E�J�J�J�H�H�H�D�D�D�3�3�3�	;�	;�	;�	;������rr"�__main__)�mainz!idlelib.idle_test.test_help_aboutrF)�	verbosity�exit)�run)!r�rwrrdrrr�tkinterrrrrr	r
rrr
rrrrrr�idlelibrr7r r"r��unittestr��idlelib.idle_test.htestr�rrr�<module>r�s�����
�	�	�	�
�
�
�
�����1�1�1�1�1�1�1�1�>�>�>�>�>�>�>�>�>�>�>�>�>�>�F�F�F�F�F�F�F�F�F�F�F�F�F�F�F�F�F�F�F�F�F�F�F�F�������
�.�
�
��%�%�%�s�s�s�s�s�(�s�s�s�l�z����������D�	,���F�F�F�F�+�+�+�+�+�+��C��������r