Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.11/idlelib/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.11/idlelib/__pycache__/outwin.cpython-311.opt-2.pyc

�

RԚgS���	ddlZddlmZddlmZgd�Zdad�Zd�ZGd�de��Z	Gd	�d
��Z
edkrddlm
Z
e
d
dd���dSdS)�N)�
messagebox)�EditorWindow)zfile "([^"]*)", line (\d+)z([^\s]+)\((\d+)\)z^(\s*\S.*?):\s*(\d+):z([^\s]+):\s*(\d+):z^\s*(\S.*?):\s*(\d+):c�*�	d�tD��adS)Nc�L�g|]!}tj|tj����"S�)�re�compile�
IGNORECASE)�.0�pats  �+/usr/local/lib/python3.11/idlelib/outwin.py�
<listcomp>z!compile_progs.<locals>.<listcomp>s6��2�2�2���z�#�r�}�5�5�2�2�2�)�file_line_pats�file_line_progsrrr
�
compile_progsrs'��E�2�2�"0�2�2�2�O�O�Orc�X�	tst��tD]h}|�|��}|rO|�dd��\}}	t	|��}|���n#t$rY�dwxYw�idS	|t|��fS#t$rYdSwxYw)N��)	rr�search�group�open�close�OSError�int�	TypeError)�line�prog�match�filename�lineno�fs      r
�file_line_helperr#s�����������������D�!�!���	�$�{�{�1�a�0�0��H�f�
���N�N�����	�	�	�����
�
�
���
����
	��t����V���$�$�������t�t����s$�#A6�6
B�B�
B�
B)�(B)c�V�eZdZ	gd�ZdZd�Zd�Zd�Zd�Zdd	�Z	d
�Z
d�Zd�Zdd�Z
d
S)�OutputWindow))�Cutz<<cut>>�rmenu_check_cut)�Copyz<<copy>>�rmenu_check_copy)�Pastez	<<paste>>�rmenu_check_paste)NNN)zGo to file/line�<<goto-file-line>>NFc�j�tj|g|�R�|j�d|j��dS)Nr,)r�__init__�text�bind�goto_file_line)�self�argss  r
r.zOutputWindow.__init__Ns;����d�*�T�*�*�*�*��	���+�T�-@�A�A�A�A�Arc��	dS)NFr)r2r s  r
�ispythonsourcezOutputWindow.ispythonsourceSs
��@��urc��	dS)N�Outputr�r2s r
�short_titlezOutputWindow.short_titleWs
��'��xrc�4�	|���rdndS)N�yes�no)�	get_savedr8s r
�	maybesavezOutputWindow.maybesave[s��E����(�(�2�u�u�d�2rr�insertc��	|j�|||��|j�|��|j���t	|��S�N)r/r?�see�update_idletasks�len�r2�s�tags�marks    r
�writezOutputWindow.write`sV��	� 	
�	����q�$�'�'�'��	�
�
�d�����	�"�"�$�$�$��1�v�v�
rc�<�	|D]}|�|���dSrA)rI)r2�linesrs   r
�
writelineszOutputWindow.writelinesvs3��,��	�	�D��J�J�t�����	�	rc��	dSrArr8s r
�flushzOutputWindow.flush{s
��B��rc�(�tj|i|��dSrA)r�	showerror)r2r3�kwargss   r
rPzOutputWindow.showerrors����d�-�f�-�-�-�-�-rNc�6�	|j�dd��}t|��}|sK|j�dd��}t|��}|s|�dd|j���dS|\}}|j�||��dS)Nzinsert linestartzinsert lineendzinsert -1line linestartzinsert -1line lineendzNo special linezTThe line you point at doesn't look like a valid file name followed by a line number.)�parent)r/�getr#rP�flist�gotofileline)r2�eventr�resultr r!s      r
r1zOutputWindow.goto_file_line�s���	��y�}�}�/�1A�B�B��!�$�'�'���	��9�=�=�!:�!8�:�:�D�%�d�+�+�F��
����%�C��9�	�&�&�&�
��!���&��
����&�1�1�1�1�1r)rr?rA)�__name__�
__module__�__qualname__�rmenu_specs�allow_code_contextr.r5r9r>rIrLrNrPr1rrr
r%r%:s�����������K���B�B�B�
������3�3�3�
����,���

�
�
�.�.�.�2�2�2�2�2�2rr%c�2�eZdZddiddid�Zd�Zd�Zd�ZdS)	�OnDemandOutputWindow�
foreground�bluez#007700)�stdout�stderrc�"�||_d|_dSrA)rU�owin)r2rUs  r
r.zOnDemandOutputWindow.__init__�s����
���	�	�	rc�t�|js|���|j�|||��dSrA)re�setuprIrEs    r
rIzOnDemandOutputWindow.write�s7���y�	��J�J�L�L�L��	����4��&�&�&�&�&rc���t|j��x|_}|j}|j���D]\}}|r|j|fi|���|�d��|jj|_dS)N�sel)	r%rUrer/�tagdefs�items�
tag_configure�	tag_raiserI)r2rer/�tag�cnfs     r
rgzOnDemandOutputWindow.setup�s���'��
�3�3�3��	�D��y����*�*�,�,�	/�	/�H�C���
/�"��"�3�.�.�#�.�.�.�����u�����Y�_��
�
�
rN)rYrZr[rjr.rIrgrrr
r_r_�s_������!�&�)� �)�,���G����'�'�'�
%�%�%�%�%rr_�__main__)�mainzidlelib.idle_test.test_outwinrF)�	verbosity�exit)r�tkinterr�idlelib.editorrrrrr#r%r_rY�unittestrqrrr
�<module>rws���
�	�	�	�������'�'�'�'�'�'�������2�2�2����8a2�a2�a2�a2�a2�<�a2�a2�a2�J%�%�%�%�%�%�%�%�6�z����������D�	(�A�E�B�B�B�B�B�B��r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists