Viewing File: /opt/alt/python35/lib64/python3.5/idlelib/__pycache__/OutputWindow.cpython-35.opt-2.pyc



]*@srddlTddlmZddlZddljZddlmZGdddeZ	GdddZ
dS)	)*)EditorWindowN)	IOBindingc@seZdZddZddZddZddZfd	d
dZdd
ZddZ	d%d&d'd(d)gZ
ddddd gZdZdd!d"Z
d#d$ZdS)*OutputWindowcGs*tj|||jjd|jdS)Nz<<goto-file-line>>)r__init__textbindgoto_file_line)selfargsr1/opt/alt/python35/lib64/python3.5/OutputWindow.pyrszOutputWindow.__init__cCsdS)Nrr)r
filenamerrr
ispythonsourceszOutputWindow.ispythonsourcecCsdS)NZOutputr)r
rrr
short_titleszOutputWindow.short_titlecCs|jrdSdSdS)Nyesno)Z	get_saved)r
rrr
	maybesaveszOutputWindow.maybesaveinsertcCsgt|ttfr*|jtjd}|jj||||jj||jjt	|S)Nreplace)

isinstancebytesdecoderencodingrrZseeupdatelen)r
stagsmarkrrr
write%s
zOutputWindow.writecCs"x|D]}|j|qWdS)N)r)r
lineslinerrr

writelines-s
zOutputWindow.writelinescCsdS)Nr)r
rrr
flush1szOutputWindow.flushCut<<cut>>rmenu_check_cutCopy<<copy>>rmenu_check_copyPaste	<<paste>>rmenu_check_pasteNGo to file/line<<goto-file-line>>zfile "([^"]*)", line (\d+)z([^\s]+)\((\d+)\)z^(\s*\S.*?):\s*(\d+):z([^\s]+):\s*(\d+):z^\s*(\S.*?):\s*(\d+):c	Cs|jdkrNg}x-|jD]"}|jtj|tjqW||_|jjdd}|j|}|s|jjdd}|j|}|st	j
ddd|jdS|\}}|jj|}|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)file_line_progsfile_line_patsappendrecompile
IGNORECASErget_file_line_helpertkMessageBoxZ	showerrorflistopenZgotoline)	r
eventlpatr!resultrlinenoZeditrrr
r	Is( 		
zOutputWindow.goto_file_linecCsxx|jD]i}|j|}|r
|jdd\}}yt|d}|jPWq
tk
rrw
Yq
Xq
WdSy|t|fSWntk
rdSYnXdS)Nr)r0searchgroupr:closeOSErrorint	TypeError)r
r!progmatchrr?frrr
r7ds


zOutputWindow._file_line_helper)r$r%r&)r'r(r))r*r+r,)NNN)r-r.N)__name__
__module____qualname__rrrrrr"r#Zrmenu_specsr1r0r	r7rrrr
rs(			rc@sReZdZdddidddiiZddZdd	Zd
dZdS)
OnDemandOutputWindowstdoutZ
foregroundZbluestderrz#007700cCs||_d|_dS)N)r9owin)r
r9rrr
rs	zOnDemandOutputWindow.__init__cCs-|js|j|jj|||dS)N)rRsetupr)r
rrrrrr
rs	
zOnDemandOutputWindow.writecCsut|j|_}|j}x3|jjD]"\}}|r/|j||q/W|jd|jj|_dS)NZsel)	rr9rRrtagdefsitemsZ
tag_configureZ	tag_raiser)r
rRrtagZcnfrrr
rSs	
zOnDemandOutputWindow.setupN)rLrMrNrTrrrSrrrr
rOxs
rO)tkinterZidlelib.EditorWindowrr3Ztkinter.messageboxZ
messageboxr8ZidlelibrrrOrrrr
<module>s
q
Back to Directory File Manager