Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/idlelib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/idlelib/__pycache__/outwin.cpython-38.opt-2.pyc
U

@��gM�@s�ddlZddlmZddlmZdddddgZdad	d
�Zdd�ZGd
d�de�Z	Gdd�d�Z
edkr�ddlm
Z
e
dddd�dS)�N)�
messagebox)�EditorWindowzfile "([^"]*)", line (\d+)z([^\s]+)\((\d+)\)z^(\s*\S.*?):\s*(\d+):z([^\s]+):\s*(\d+):z^\s*(\S.*?):\s*(\d+):cCsdd�tD�adS)NcSsg|]}t�|tj��qS�)�re�compile�
IGNORECASE)�.0�patrr�-/opt/cppython/lib/python3.8/idlelib/outwin.py�
<listcomp>s�z!compile_progs.<locals>.<listcomp>)�file_line_pats�file_line_progsrrrr
�
compile_progss�rc	Cs�ts
t�tD]X}|�|�}|r|�dd�\}}zt|d�}|��WqlWqtk
rdYqYqXqdSz|t|�fWStk
r�YdSXdS)N���r)	r
r�search�group�open�close�OSError�int�	TypeError)�line�prog�match�filename�lineno�frrr
�file_line_helpers"


rc@sjeZdZdddddgZdZdd�Zd	d
�Zdd�Zd
d�Zddd�Z	dd�Z
dd�Zdd�Zddd�Z
dS)�OutputWindow)ZCutz<<cut>>Zrmenu_check_cut)ZCopyz<<copy>>Zrmenu_check_copy)ZPastez	<<paste>>Zrmenu_check_paste)NNN)zGo to file/line�<<goto-file-line>>NFcGs$tj|f|��|j�d|j�dS)Nr!)r�__init__�text�bind�goto_file_line)�self�argsrrr
r"NszOutputWindow.__init__cCsdS)NFr)r&rrrr
�ispythonsourceSszOutputWindow.ispythonsourcecCsdS)NZOutputr�r&rrr
�short_titleWszOutputWindow.short_titlecCs|��rdSdS)NZyes�no)Z	get_savedr)rrr
�	maybesave[szOutputWindow.maybesaver�insertcCs.|j�|||�|j�|�|j��t|�S�N)r#r-Zsee�update�len�r&�sZtagsZmarkrrr
�write`s
zOutputWindow.writecCs|D]}|�|�qdSr.)r3)r&�linesrrrr
�
writelinesvszOutputWindow.writelinescCsdSr.rr)rrr
�flush{szOutputWindow.flushcOstj||�dSr.)r�	showerror)r&r'�kwargsrrr
r7szOutputWindow.showerrorNcCsd|j�dd�}t|�}|sJ|j�dd�}t|�}|sJ|jdd|jd�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#�getrr7�flistZgotofileline)r&�eventr�resultrrrrr
r%�s 	��zOutputWindow.goto_file_line)rr-)N)�__name__�
__module__�__qualname__Zrmenu_specsZallow_code_contextr"r(r*r,r3r5r6r7r%rrrr
r :s �
r c@s6eZdZddiddid�Zdd�Zdd�Zd	d
�ZdS)�OnDemandOutputWindowZ
foregroundZbluez#007700)�stdout�stderrcCs||_d|_dSr.)r;�owin)r&r;rrr
r"�szOnDemandOutputWindow.__init__cCs"|js|��|j�|||�dSr.)rD�setupr3r1rrr
r3�szOnDemandOutputWindow.writecCsTt|j�|_}|j}|j��D]\}}|r |j|f|�q |�d�|jj|_dS)NZsel)	r r;rDr#�tagdefs�itemsZ
tag_configureZ	tag_raiser3)r&rDr#�tagZcnfrrr
rE�s
zOnDemandOutputWindow.setupN)r>r?r@rFr"r3rErrrr
rA�s�rA�__main__)�mainzidlelib.idle_test.test_outwinrF)�	verbosity�exit)r�tkinterrZidlelib.editorrrr
rrr rAr>ZunittestrJrrrr
�<module>s �	e

F1le Man4ger