add-determinism 0.7.3

RPM buildroot helper to strip nondeterministic bits in files
Documentation
a

Z��^�c@s�ddlZddlmZddlmZddlmZgd�Zdadd�Z	dd	�Z
Gd
d�de�ZGdd
�d
�Ze
dkr�ddlmZedddd�dS)iN)�
messagebox)�EditorWindow)�iomenu)zfile "([^"]*)", 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�)�reZcompileZ
IGNORECASE)Z.0Zpatrr�&/usr/lib64/python3.9/idlelib/outwin.pyZ
<listcomp>s�z!compile_progs.<locals>.<listcomp>)�file_line_pats�file_line_progsrrrr�
compile_progss�rc	Cs�ts
t�tD]V}|�|�}|r|�dd�\}}zt|d�}|��WqjWqtybYqYq0qdSz|t|�fWSty�YdS0dS)Ni�Zr)	rrZsearchZgroupZopenZcloseZOSErrorZintZ	TypeError)�lineZprogZmatch�filename�linenoZfrrr�file_line_helpers"


r
c@sdeZdZgd�ZdZdd�Zdd�Zdd�Zd	d
�Zdd
d�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|g|�R�|j�d|j�dS)Nr)r�__init__�textZbind�goto_file_line)�self�argsrrrrOszOutputWindow.__init__cC�dS)NFr)rrrrr�ispythonsourceT�zOutputWindow.ispythonsourcecCr)NZOutputr�rrrr�short_titleXrzOutputWindow.short_titlecCs|��rdSdS)NZyesZno)Z	get_savedrrrr�	maybesave\rzOutputWindow.maybesaver�insertcCsFt|t�r|�tjd�}|j�|||�|j�|�|j��t	|�S)NZreplace)
Z
isinstanceZbytesZdecoderZencodingrrZseeZupdateZlen�rZsZtagsZmarkrrr�writeas

zOutputWindow.writecCs|D]}|�|�qdS�N)r)rZlinesr
rrr�
writelinesxszOutputWindow.writelinescCsdSrrrrrr�flush}rzOutputWindow.flushcOstj|i|��dSr)r�	showerror)rrZkwargsrrrr!�szOutputWindow.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.)Zparent)rZgetr
r!�flistZgotofileline)rZeventr
Zresultrrrrrr�s 	��zOutputWindow.goto_file_line)rrr)�__name__�
__module__�__qualname__Zrmenu_specsZallow_code_contextrrrrrrr r!rrrrrr;s

rc@s6eZdZddiddid�Zdd�Zdd�Zd	d
�ZdS)�OnDemandOutputWindowZ
foregroundZbluez#007700)ZstdoutZstderrcCs||_d|_dSr)r"�owin)rr"rrrr�szOnDemandOutputWindow.__init__cCs"|js|��|j�|||�dSr)r'�setuprrrrrr�szOnDemandOutputWindow.writecCsXt|j�|_}|j}|j��D]\}}|r |j|fi|��q |�d�|jj|_dS)NZsel)	rr"r'r�tagdefsZitemsZ
tag_configureZ	tag_raiser)rr'rZtagZcnfrrrr(�s
zOnDemandOutputWindow.setupN)r#r$r%r)rrr(rrrrr&�s�r&Z__main__)�mainzidlelib.idle_test.test_outwinr	F)Z	verbosityZexit)rZtkinterrZidlelib.editorrZidlelibrrrrr
rr&r#Zunittestr*rrrrZ<module>s	f