Sindbad~EG File Manager

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

�

%ΜgI���	ddlZddlmZddlmZgd�Zdad�Zd�ZGd�de�Z	Gd	�d
�Z
edk(rddlm
Z
e
d
dd��yy)�N)�
messagebox)�EditorWindow)zfile "([^"]*)", line (\d+)z([^\s]+)\((\d+)\)z^(\s*\S.*?):\s*(\d+):z([^\s]+):\s*(\d+):z^\s*(\S.*?):\s*(\d+):c�|�	tD�cgc]&}tj|tj���(c}aycc}w�N)�file_line_pats�re�compile�
IGNORECASE�file_line_progs)�pats �+/usr/local/lib/python3.12/idlelib/outwin.py�
compile_progsrs8��E�#1�2�"0�3��z�z�#�r�}�}�5�"0�2�O��2s�+9c� �	ts
t�tD]H}|j|�}|s�|jdd�\}}	t	|�}|j�ny	|t|�fS#t$rY�ewxYw#t$rYywxYw)N��)	rr�search�group�open�close�OSError�int�	TypeError)�line�prog�match�filename�lineno�fs      r
�file_line_helperrs������������D�!���$�{�{�1�a�0��H�f�
���N�����	�� �����V��$�$���
��
������s$�A2�%B�2	A>�=A>�	B
�B
c�T�eZdZ	gd�ZdZd�Zd�Zd�Zd�Zd
d�Z	d�Z
d	�Zd
�Zdd�Z
y)�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�|�tj|g|���|jjd|j�y)Nr()r�__init__�text�bind�goto_file_line)�self�argss  r
r*zOutputWindow.__init__Ns.�����d�*�T�*��	�	���+�T�-@�-@�A�c��	y)NF�)r.rs  r
�ispythonsourcezOutputWindow.ispythonsourceSs��@�r0c��	y)N�Outputr2�r.s r
�short_titlezOutputWindow.short_titleWs��'�r0c�,�	|j�rdSdS)N�yes�no)�	get_savedr6s r
�	maybesavezOutputWindow.maybesave[s��E����(�u�2�d�2r0c��	|jj|||�|jj|�|jj�t	|�Sr)r+�insert�see�update�len�r.�s�tags�marks    r
�writezOutputWindow.write`sH��	� 	
�	�	����q�$�'��	�	�
�
�d���	�	�����1�v�
r0c�6�	|D]}|j|��yr)rF)r.�linesrs   r
�
writelineszOutputWindow.writelinesvs��,��D��J�J�t��r0c��	yrr2r6s r
�flushzOutputWindow.flush{s��B�r0c�.�tj|i|��yr)r�	showerror)r.r/�kwargss   r
rMzOutputWindow.showerrors�����d�-�f�-r0Nc�*�	|jjdd�}t|�}|sH|jjdd�}t|�}|s|jdd|j��y|\}}|jj||�y)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+�getrrM�flist�gotofileline)r.�eventr�resultrrs      r
r-zOutputWindow.goto_file_line�s���	��y�y�}�}�/�1A�B��!�$�'����9�9�=�=�!:�!8�:�D�%�d�+�F�����%�C��9�9�	�&�
�!���&��
�
����&�1r0)r2r>r)�__name__�
__module__�__qualname__�rmenu_specs�allow_code_contextr*r3r7r<rFrIrKrMr-r2r0r
r!r!:sD����K���B�
��3�
�,�

�.�2r0r!c�0�eZdZddiddid�Zd�Zd�Zd�Zy)	�OnDemandOutputWindow�
foreground�bluez#007700)�stdout�stderrc� �||_d|_yr)rR�owin)r.rRs  r
r*zOnDemandOutputWindow.__init__�s����
���	r0c�v�|js|j�|jj|||�yr)rb�setuprFrBs    r
rFzOnDemandOutputWindow.write�s&���y�y��J�J�L��	�	����4��&r0c��t|j�x|_}|j}|jj�D]\}}|s�	|j|fi|���|jd�|jj|_y)N�sel)	r!rRrbr+�tagdefs�items�
tag_configure�	tag_raiserF)r.rbr+�tag�cnfs     r
rdzOnDemandOutputWindow.setup�sp��'��
�
�3�3��	�D��y�y�����*�*�,�H�C���"��"�"�3�.�#�.�-�	
���u���Y�Y�_�_��
r0N)rVrWrXrgr*rFrdr2r0r
r\r\�s*��!�&�)� �)�,��G��'�
%r0r\�__main__)�mainzidlelib.idle_test.test_outwinrF)�	verbosity�exit)r�tkinterr�idlelib.editorrrrrrr!r\rV�unittestrnr2r0r
�<module>rtse���
��'�����2��8a2�<�a2�J%�%�6�z����	(�A�E�B�r0

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