Your IP : 3.146.255.161


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/cmd.cpython-312.opt-2.pyc

�

�Q�f:��l�	ddlZddlZdgZdZejej
zdzZGd�d�Zy)�N�Cmdz(Cmd) �_c��eZdZ	eZeZdZdZdZ	dZ
dZdZdZ
dZdZdd	�Zdd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z dd�Z!y)r�=�Nz(Documented commands (type help <topic>):zMiscellaneous help topics:zUndocumented commands:z*** No help on %s�c��	|�||_ntj|_|�||_ntj|_g|_||_y�N)�stdin�sys�stdout�cmdqueue�completekey)�selfrrr
s    �*/opt/alt/python312/lib64/python3.12/cmd.py�__init__zCmd.__init__LsH��		����D�J����D�J��� �D�K��*�*�D�K���
�&���c��	|j�|jr_|jrS	ddl}|j	�|_|j
|j�|j|jdz�	|�||_
|jr1|jjt|j�dz�d}|s�|jr|jjd�}n�|jr	t!|j"�}nx|jj|j"�|jj'�|j(j�}t+|�sd}n|j-d�}|j/|�}|j1|�}|j3||�}|s��|j5�|jr.|jr!	ddl}|j
|j
�yyy#t$rY���wxYw#t$$rd}Y��wxYw#t$rYywxYw#|jr=|jr0	ddl}|j
|j
�w#t$rYwwxYwwwxYw)Nrz
: complete�
�EOFz
)�preloop�use_rawinputr�readline�
get_completer�
old_completer�
set_completer�complete�parse_and_bind�ImportError�intror
�write�strr�pop�input�prompt�EOFError�flushr�len�rstrip�precmd�onecmd�postcmd�postloop)rr r�stop�lines     r�cmdloopzCmd.cmdloopbs)��	�	
��������!1�!1�
��%-�%;�%;�%=��"��&�&�t�}�}�5��'�'��(8�(8��(E�F�!	�� �"��
��z�z����!�!�#�d�j�j�/�$�"6�7��D���=�=��=�=�,�,�Q�/�D��(�(�)�#(����#5�D����)�)�$�+�+�6����)�)�+�#�z�z�2�2�4��"�4�y�#(�D�#'�;�;�v�#6�D��{�{�4�(���{�{�4�(���|�|�D�$�/��'�(
�M�M�O�� � �T�%5�%5��#��*�*�4�+=�+=�>�&6� ��=�
��
�� (�)�#(�D�)��&#�����	� � �T�%5�%5��#��*�*�4�+=�+=�>��"�����	&6� �s��AH
�>A>H=�=H�B/H=�H=�+H.�
	H�H�H+�(H=�*H+�+H=�.	H:�9H:�=J�I7�6J�7	J�J�J�Jc��	|Sr
��rr/s  rr*z
Cmd.precmd�s��	��rc��	|Sr
r2)rr.r/s   rr,zCmd.postcmd�s
��M��rc��	yr
r2�rs rrzCmd.preloop�s��L�rc��	yr
r2r6s rr-zCmd.postloop�s��	�	
rc�P�	|j�}|sdd|fS|ddk(r	d|ddz}n"|ddk(rt|d�r	d|ddz}ndd|fSdt|�}}||kr-|||jvr|dz}||kr|||jvr�|d|||dj�}}|||fS)Nr�?zhelp r�!�do_shellzshell )�strip�hasattrr(�
identchars)rr/�i�n�cmd�args      r�	parselinez
Cmd.parseline�s���	��z�z�|�����t�#�#�
�!�W��^��T�!�"�X�%�D�
�!�W��^��t�Z�(��$�q�r�(�*���T�4�'�'��#�d�)�1���!�e��Q��4�?�?�2��!��A�a�!�e��Q��4�?�?�2����8�T�!�"�X�^�^�-�S���C��~�rc�:�	|j|�\}}}|s|j�S|�|j|�S||_|dk(rd|_|dk(r|j|�S	t	|d|z�}||�S#t
$r|j|�cYSwxYw)Nrr�do_)rC�	emptyline�default�lastcmd�getattr�AttributeError)rr/rArB�funcs     rr+z
Cmd.onecmd�s���	�����-���S�$���>�>�#�#��;��<�<��%�%�����5�=��D�L��"�9��<�<��%�%�
*��t�U�S�[�1����9���"�
*��|�|�D�)�)�
*�s�&A=�=B�Bc�T�	|jr|j|j�Syr
)rHr+r6s rrFz
Cmd.emptyline�s(��	��<�<��;�;�t�|�|�,�,�rc�B�	|jjd|z�y)Nz*** Unknown syntax: %s
)r
r!r3s  rrGzCmd.default�s!��	�	
�����4�T�9�:rc��	gSr
r2)r�ignoreds  r�completedefaultzCmd.completedefault�s��	��	rc�|�d|z}|j�D�cgc]}|j|�s�|dd��c}Scc}w)NrE�)�	get_names�
startswith)r�textrO�dotext�as     r�
completenameszCmd.completenames�s=���t���#�~�~�/�H�/�!�1�<�<��3G��!�"��/�H�H��Hs�9�9c��	|dk(r�ddl}|j�}|j�}t|�t|�z
}|j	�|z
}|j�|z
}|dkDr8|j
|�\}	}
}|	dk(r
|j}n	t|d|	z�}n|j}|||||�|_	|j|S#t$r|j}Y�7wxYw#t$rYywxYw)Nrr�	complete_)
r�get_line_buffer�lstripr(�
get_begidx�
get_endidxrCrPrIrJrX�completion_matches�
IndexError)
rrU�stater�origliner/�stripped�begidx�endidxrA�args�foo�compfuncs
             rrzCmd.complete�s
��	�
�A�:���/�/�1�H��?�?�$�D��8�}�s�4�y�0�H��(�(�*�X�5�F��(�(�*�X�5�F��a�x�!%����!5���T�3��"�9�#�3�3�H�8�#*�4��s�1B�#C�� �-�-��&.�t�T�6�6�&J�D�#�	��*�*�5�1�1��
*�8�#'�#7�#7��8���	��	�s$�C�C,�C)�(C)�,	C8�7C8c�,�t|j�Sr
)�dir�	__class__r6s rrSz
Cmd.get_namess���4�>�>�"�"rc���t|j���}t�fd�|j�D��}t||z�S)Nc3�V�K�|] }|jd�dz�r|dd���"y�w)�help_r�N)rT)�.0rWrfs  �r�	<genexpr>z$Cmd.complete_help.<locals>.<genexpr> s4�����9�$4�q����W�t�A�w�%6�7��q�r�U�$4�s�&))�setrXrS�list)rrf�commands�topicss `  r�
complete_helpzCmd.complete_helpsH����)�t�)�)�4�0�1���9�D�N�N�$4�9�9���H�v�%�&�&rc�6�	|r	t|d|z�}|�y|j�}g}g}t�}|D]}|dddk(s�|j|dd��!|j�d}	|D]x}|dddk(s�||	k(r�|}	|dd}
|
|vr#|j|
�|j|
��@t||�jr|j|
��h|j|
��z|jj	dt|j�z�|j|j|dd�|j|j t#|�dd�|j|j$|dd�y#t$r�	t|d|z�j}|r)|jj	dt|�z�Yyn#t$rYnwxYw|jj	dt|j|fz�z�YywxYw)	NrnrE�%s
rorrR��P)rIrJ�__doc__r
r!r"�nohelprSrr�add�sort�append�remove�
doc_leader�print_topics�
doc_header�misc_header�sorted�undoc_header)rrBrK�doc�names�cmds_doc�
cmds_undocru�name�prevnamerAs           r�do_helpzCmd.do_help$s���O��
��t�W�s�]�3��
�F��N�N�$�E��H��J��U�F������8�w�&��J�J�t�A�B�x�(��
�J�J�L��H������8�u�$��x�'� �#�H��Q�R��C��f�}� ����,��
�
�c�*� ��t�,�4�4� ����,�"�)�)�#�.��
�K�K���f�S����%9�9�:����d�o�o��R��C����d�.�.�����2�F����d�/�/��R��C��M"�	
����e�c�k�2�:�:�C�����)�)�&��S��/�:����&��������!�!�&��T�[�[�C�6�-A�)B�"B�C��	
�s6�F�	H�AG�H�	G�H�G�8H�Hc	�J�|r�|jjdt|�z�|jr=|jjdt|jt	|�z�z�|j||dz
�|jjd�yy)Nrxrr)r
r!r"�rulerr(�	columnize)r�header�cmds�cmdlen�maxcols     rr�zCmd.print_topicsRsy����K�K���f�S��[�0�1��z�z����!�!�&��T�Z�Z�#�f�+�-E�)F�"F�G��N�N�4����*��K�K���d�#�rc	�`�	|s|jjd�ytt|��D�cgc]}t	||t
�s|��}}|r+t
ddjtt
|��z��t|�}|dk(r+|jjdt|d�z�ytdt|��D]�}||zdz
|z}g}d}	t|�D]]}
d}t|�D]+}|||
zz}||k\rn||}
t|t|
��}�-|j|�|	|dzz
}	|	|kDs�]n|	|ks��nt|�}d}dg}t|�D]�}g}t|�D](}
|||
zz}||k\rd	}
n||}
|j|
��*|r|d
s|d
=|r|d
s�tt|��D]}
||
j||
�||
<�|jjdtdj|��z���ycc}w)Nz<empty>
z list[i] not a string for i in %sz, rrxr����r���z  )r
r!�ranger(�
isinstancer"�	TypeError�join�map�maxr�ljust)rrs�displaywidthr?�
nonstrings�size�nrows�ncols�	colwidths�totwidth�col�colwidth�row�x�textss               rr�z
Cmd.columnizeZsF��	�
��K�K���k�*��!&�s�4�y�!1�9�!1�A�)�$�q�'�3�7��!1�
�9���>�"�i�i��C��(<�=�>�?�
?��4�y���1�9��K�K���f�S��a��\�1�2���1�c�$�i�(�E��%�Z��\�e�+�E��I��H��U�|���� ��<�C��e�C�i��A��D�y���Q��A�"�8�S��V�4�H�(�� � ��*��H�q�L�(���l�*��$��<�'��#)�&��I�E��E���I���<�C��E��U�|���%��)�O����9��A��Q��A����Q��
$���b�	��"�I���b�	��S��Z�(��"�3�Z�-�-�i��n�=��c�
�)��K�K���f�S����5�)9�%:�:�;� ��A9s�H+)�tabNNr
)rz)"�__name__�
__module__�__qualname__�PROMPTr%�
IDENTCHARSr>r�rHr r�r�r�r�r|rrr0r*r,rr-rCr+rFrGrPrXrrSrvr�r�r�r2rrrr4s���
��F��J��E��G��E��J�;�J�.�K�+�L�
 �F��L�'�,1�h��
�
��(�6-�;��I��<#�
'�,D�\$�7<r)�stringr�__all__r��
ascii_letters�digitsr�rr2rr�<module>r�sA��*�X��'��	��
�
!�
!�F�M�M�
1�C�
7�
�]<�]<r

?>