• File: outwin.cpython-37.opt-2.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib64/python3.7/idlelib/__pycache__/outwin.cpython-37.opt-2.pyc
  • Date Modified: 10/26/2026 8:08 PM
  • File size: 4.28 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

YI~d@sddlZddlmZddlmZddlmZddddd	gZdad
dZ	dd
Z
GdddeZGdddZe
dkrddlmZedddddS)N)
messagebox)EditorWindow)iomenuzfile "([^"]*)", line (\d+)z([^\s]+)\((\d+)\)z^(\s*\S.*?):\s*(\d+):z([^\s]+):\s*(\d+):z^\s*(\S.*?):\s*(\d+):cCsddtDadS)NcSsg|]}t|tjqS)recompile
IGNORECASE).0Zpatrr3/opt/alt/python37/lib64/python3.7/idlelib/outwin.py
<listcomp>sz!compile_progs.<locals>.<listcomp>)file_line_patsfile_line_progsrrrr

compile_progssrc	Csts
tx^tD]R}||}|r|dd\}}yt|d}|PWqtk
r`wYqXqWdSy|t|fStk
rdSXdS)Nr)	r
rsearchgroupopencloseOSErrorint	TypeError)lineprogmatchfilenamelinenofrrr
file_line_helpers"


rc@sjeZdZdddddgZdZddZd	d
ZddZd
dZdddZ	ddZ
ddZddZdddZ
dS)OutputWindow)ZCutz<<cut>>Zrmenu_check_cut)ZCopyz<<copy>>Zrmenu_check_copy)ZPastez	<<paste>>Zrmenu_check_paste)NNN)zGo to file/linez<<goto-file-line>>NFcGs$tj|f||jd|jdS)Nz<<goto-file-line>>)r__init__textZbindgoto_file_line)selfargsrrr
r!OszOutputWindow.__init__cCsdS)NFr)r$rrrr
ispythonsourceTszOutputWindow.ispythonsourcecCsdS)NZOutputr)r$rrr
short_titleXszOutputWindow.short_titlecCs|rdSdS)NZyesno)Z	get_saved)r$rrr
	maybesave\szOutputWindow.maybesaverinsertcCsFt|tr|tjd}|j||||j||jt	|S)Nreplace)

isinstancebytesdecoderencodingr"r*Zseeupdatelen)r$stagsmarkrrr
writeas

zOutputWindow.writecCsx|D]}||qWdS)N)r5)r$linesrrrr

writelinesxs
zOutputWindow.writelinescCsdS)Nr)r$rrr
flush}szOutputWindow.flushcOstj||dS)N)r	showerror)r$r%kwargsrrr
r9szOutputWindow.showerrorNcCsd|jdd}t|}|sJ|jdd}t|}|sJ|jdd|jddS|\}}|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"getrr9flistZgotofileline)r$Zeventrresultrrrrr
r#s	
zOutputWindow.goto_file_line)rr*)N)__name__
__module____qualname__Zrmenu_specsZallow_code_contextr!r&r'r)r5r7r8r9r#rrrr
r ;s
r c@s6eZdZddiddidZddZddZd	d
ZdS)OnDemandOutputWindowZ
foregroundZbluez#007700)stdoutstderrcCs||_d|_dS)N)r=owin)r$r=rrr
r!szOnDemandOutputWindow.__init__cCs"|js||j|||dS)N)rEsetupr5)r$r2r3r4rrr
r5szOnDemandOutputWindow.writecCsXt|j|_}|j}x(|jD]\}}|r"|j|f|q"W|d|jj|_dS)NZsel)	r r=rEr"tagdefsitemsZ
tag_configureZ	tag_raiser5)r$rEr"tagZcnfrrr
rFs
zOnDemandOutputWindow.setupN)r?r@rArGr!r5rFrrrr
rBs
rB__main__)mainzidlelib.idle_test.test_outwinrF)	verbosityexit)rZtkinterrZidlelib.editorrZidlelibrrr
rrr rBr?ZunittestrKrrrr
<module>s f