Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/root/sys/lib/python2.7/idlelib/Debugger.pyo

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�`^c@s�ddlZddlZddlZddlTddlmZddlmZddlm	Z	dej
fd��YZdfd	��YZd
efd��YZ
dfd
��YZdS(i�N(t*(tListedToplevel(tScrolledList(t
macosxSupporttIdbcBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCs||_tjj|�dS(N(tguitbdbtBdbt__init__(tselfR((s&/sys/lib/python2.7/idlelib/Debugger.pyRs	cCsC|j|�r|j�dS|j|�}|jj||�dS(N(tin_rpc_codetset_stept_Idb__frame2messageRtinteraction(R	tframetmessage((s&/sys/lib/python2.7/idlelib/Debugger.pyt	user_lines

cCsF|j|�r|j�dS|j|�}|jj|||�dS(N(R
RRRR
(R	RtinfoR((s&/sys/lib/python2.7/idlelib/Debugger.pytuser_exceptions

cCsL|jjjd�rtS|j}|jjjd�r;tS|j|�SdS(Nsrpc.pysDebugger.py(tf_codetco_filenametcounttTruetf_backtFalseR
(R	Rt
prev_frame((s&/sys/lib/python2.7/idlelib/Debugger.pyR
s	cCsf|j}|j}|j}tjj|�}d||f}|jdkrbd||jf}n|S(Ns%s:%st?s%s: %s()(RRtf_linenotostpathtbasenametco_name(R	RtcodetfilenametlinenoRR((s&/sys/lib/python2.7/idlelib/Debugger.pyt__frame2message(s			(t__name__t
__module__RRRR
R(((s&/sys/lib/python2.7/idlelib/Debugger.pyR
s
				
tDebuggercBs�eZdZZZZdd�Zd�Zdd�Z	d�Z
dd�Zd�Zd�Z
d�Zd�Zd	�Zd
�Zd�ZdZd�Zd
�Zd�ZdZdZd�Zd�Zdd�Zd�Zd�Zd�Zd�ZRS(cCsM|dkrt|�}n||_||_d|_|j�d|_dS(Ni(tNoneRtpyshelltidbRtmake_guitinteracting(R	R(R)((s&/sys/lib/python2.7/idlelib/Debugger.pyR7s			
cGs.zd|_|jj|�SWdd|_XdS(Nii(R+R)trun(R	targs((s&/sys/lib/python2.7/idlelib/Debugger.pyR,@s	cCsZ|jr|jj�dS|jr<|jj�d|_n|jj�|jj�dS(N(	R+ttoptbelltstackviewertcloseR'R(tclose_debuggertdestroy(R	tevent((s&/sys/lib/python2.7/idlelib/Debugger.pyR1Gs	
	

cCs�|j}|j|_|j|_}t|�|_}|jjd�|jjd�|jd|j�|jj	d|j�t
|�|_}|jjdd�g|_
}t|ddd	|j�|_}|j|�t|dd
d	|j�|_}|j|�t|ddd	|j�|_}|j|�t|ddd	|j�|_}|j|�t|dd
d	|j�|_}|j|�x.|D]&}|jdd�|jdd�q�Wt
|�|_}|jjdd�|js$t|�|j_|jjd�nt|ddd	|j d|j�|_!|j!j"dddd�|j#s�t|�|j_#nt|ddd	|j$d|j#�|_%|j%j"dddd�|j&s�|�|j_&|j&jd�nt|ddd	|j'd|j&�|_(|j(j"dddd�|j)sNt|�|j_)nt|ddd	|j*d|j)�|_+|j+j"dddd�t,|dd�|_-|j-jdd�t,|dd�|_.|j.jdddd�|j.j/d�|_0t
|dd�|_1|j1jdddd �t
|�|_2|j2jdddd �t
|dd�|_3|j3jdddd �|jj4�r�|j �n|j&j4�r�|j'�n|j)j4�r�|j*�ndS(!Ns
Debug ControltDebugtWM_DELETE_WINDOWs<Escape>tanchortwttexttGotcommandtSteptOvertOuttQuittstatetdisabledtsidetleftitStacktvariabletrowitcolumntSourcetLocalstGlobalstfilltxt
backgroundtheighttexpandtboth(5R(tflisttrootRR.twm_titletwm_iconnametwm_protocolR1tbindtFrametbframetpacktbuttonstButtontconttbconttappendtsteptbsteptnexttbnexttrettbrettquitt	configuretcframetvstackt
BooleanVart	__class__tsettCheckbuttont
show_stacktbstacktgridtvsourcetshow_sourcetbsourcetvlocalstshow_localstblocalstvglobalstshow_globalstbglobalstLabeltstatusterrortcgetterrorbgtfstacktflocalstfglobalstget(R	R(RRR.RXtbltbRg((s&/sys/lib/python2.7/idlelib/Debugger.pyR*Ts�	
"
"
"
"
"

								

c
Cs�||_|jjd|�|r�|\}}}y
|j}Wn!tk
radt|�}nX|dk	r�yd|t|�f}Wq�q�Xnd}nd}d}|j}|jjd|d|�|j	}	|	r|j
j|j|�\}
}|	j|
|�n|j
d�|jj�r5|j�nx!|jD]}|jdd	�q?W|jj�|jj�x!|jD]}|jdd
�q}W|jjdd�|jjddd|j�d|_dS(NR9s%ss%s: %styellowtRMiR@tnormalRA(RRzRfR$tAttributeErrortstrR'R}R{R0R)t	get_stackt
load_stacktshow_variablesRpR�tsync_source_lineRZR.twakeupRRtmainloop(
R	RRRttypetvaluettbtm1tbgtsvtstacktiR�((s&/sys/lib/python2.7/idlelib/Debugger.pyR
�sD	

			



cCsl|j}|sdS|j|�\}}|d |ddkrhtjj|�rh|jj||�ndS(Nii�s<>(Rt_Debugger__frame2filelineRRtexistsRQtgotofileline(R	RR!R"((s&/sys/lib/python2.7/idlelib/Debugger.pyR��s	*cCs%|j}|j}|j}||fS(N(RRR(R	RR R!R"((s&/sys/lib/python2.7/idlelib/Debugger.pyt__frame2fileline�s			cCs|jj�|jj�dS(N(R)tset_continueRRRe(R	((s&/sys/lib/python2.7/idlelib/Debugger.pyR\�s
cCs|jj�|jj�dS(N(R)RRRRe(R	((s&/sys/lib/python2.7/idlelib/Debugger.pyR_�s
cCs$|jj|j�|jj�dS(N(R)tset_nextRRRRe(R	((s&/sys/lib/python2.7/idlelib/Debugger.pyRa�scCs$|jj|j�|jj�dS(N(R)t
set_returnRRRRe(R	((s&/sys/lib/python2.7/idlelib/Debugger.pyRc�scCs|jj�|jj�dS(N(R)tset_quitRRRe(R	((s&/sys/lib/python2.7/idlelib/Debugger.pyRe�s
cCs�|jru|jj�rut|j|j|�|_}|jr�|jj|jd�\}}|j
||�q�nB|j}|r�|jj�r�d|_|j�nd|jd<dS(NiRN(R0RhR�tStackViewerR~RQRR)R�R'R�R1(R	R�R�R�((s&/sys/lib/python2.7/idlelib/Debugger.pyRm�s			
cCs |jj�r|j�ndS(N(RpR�R�(R	((s&/sys/lib/python2.7/idlelib/Debugger.pyRq�scCs|d|_|j�dS(Ni(RR�(R	t	stackitem((s&/sys/lib/python2.7/idlelib/Debugger.pyt
show_frames
cCsp|j}|jj�r9|sbt|jd�|_qbn)|rbd|_|j�d|jd<n|j�dS(NRIiRN(tlocalsviewerRsR�tNamespaceViewerRR'R1R�(R	tlv((s&/sys/lib/python2.7/idlelib/Debugger.pyRts		
cCsp|j}|jj�r9|sbt|jd�|_qbn)|rbd|_|j�d|jd<n|j�dS(NRJiRN(t
globalsviewerRvR�R�R�R'R1R�(R	tgv((s&/sys/lib/python2.7/idlelib/Debugger.pyRws		
icCs�|j}|j}|j}|s.d}}n3|j}|j}|ra|ra||krad}n|r�|j|||jjj	�n|r�|j|||jjj	�ndS(N(
R�R�RR'tf_localst	f_globalst	load_dictR(tinterptrpcclt(R	tforceR�R�Rtldicttgdict((s&/sys/lib/python2.7/idlelib/Debugger.pyR�s			
			cCs|jj||�dS(N(R)t	set_break(R	R!R"((s&/sys/lib/python2.7/idlelib/Debugger.pytset_breakpoint_here/scCs|jj||�dS(N(R)tclear_break(R	R!R"((s&/sys/lib/python2.7/idlelib/Debugger.pytclear_breakpoint_here2scCs|jj|�dS(N(R)tclear_all_file_breaks(R	R!((s&/sys/lib/python2.7/idlelib/Debugger.pytclear_file_breaks5scCsu|jjjj�}xY|D]Q}|jj}y(x!|jD]}|j||�q;WWqtk
rlqqXqWdS(s=Load PyShellEditorWindow breakpoints into subprocess debuggerN(	R(RQtinversedicttkeystioR!tbreakpointsR�R�(R	tpyshell_edit_windowsteditwinR!R"((s&/sys/lib/python2.7/idlelib/Debugger.pytload_breakpoints8s

N( R$R%R'RhRpRsRvRR,R1R*R
R�R�R\R_RaRcReR0RmRqR�R�R�RtRwR�R�R�R�R�(((s&/sys/lib/python2.7/idlelib/Debugger.pyR&3s4		
	K,								
							R�cBs\eZd�Zd	d�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�ZRS(
cCsTtj�rtj||�ntj||dd�||_||_g|_dS(NtwidthiP(RtisAquaTkRRRQRR�(R	tmasterRQR((s&/sys/lib/python2.7/idlelib/Debugger.pyREs		cCs3||_|j�x�t|��D]�||\}}y|jd}Wn
d}nX|j}|j}|j}	ddl}
|
j	||�}ddl
}|j|�}|	dkr�d|||f}
nd||	||f}
||krd|
}
n|j
|
�q&W|dk	r/|j|�ndS(	NR$Ri�R�s%s, line %d: %ss%s.%s(), line %d: %ss> (RR�N(R�tcleartrangetlenR�RRRt	linecachetgetlinetstringtstripR'R^tselect(R	R�tindexR�RR"tmodnameR R!tfuncnameR�t
sourcelineR�titem((s&/sys/lib/python2.7/idlelib/Debugger.pyR�Qs0	

				

cCs|jrtj||�SdS(soverride base methodN(R�Rtpopup_event(R	R4((s&/sys/lib/python2.7/idlelib/Debugger.pyR�ls	cCs?|j}|jddd|j�|jddd|j�dS(soverride base methodtlabelsGo to source lineR;sShow stack frameN(tmenutadd_commandtgoto_source_linetshow_stack_frame(R	R�((s&/sys/lib/python2.7/idlelib/Debugger.pyt	fill_menuqs
	
cCsCd|ko t|j�knr?|jj|j|�ndS(soverride base methodiN(R�R�RR�(R	R�((s&/sys/lib/python2.7/idlelib/Debugger.pyt	on_selectys%cCs|j|�dS(soverride base methodN(Rq(R	R�((s&/sys/lib/python2.7/idlelib/Debugger.pyt	on_double~scCs#|jjd�}|j|�dS(Ntactive(tlistboxR�Rq(R	R�((s&/sys/lib/python2.7/idlelib/Debugger.pyR��scCsU|jjd�}d|ko2t|j�knrQ|jj|j|�ndS(NR�i(R�R�R�R�RR�(R	R�((s&/sys/lib/python2.7/idlelib/Debugger.pyR��s%cCs�d|ko t|j�kns)dS|j|\}}|j}|j}tjj|�r�|jj|�}|r�|j	|�q�ndS(Ni(
R�R�RRRRtisfileRQtopentgotoline(R	R�RR"R R!tedit((s&/sys/lib/python2.7/idlelib/Debugger.pyRq�s%		N(R$R%RR'R�R�R�R�R�R�R�Rq(((s&/sys/lib/python2.7/idlelib/Debugger.pyR�Cs							R�cBs2eZdd�ZdZddd�Zd�ZRS(c	Cs�d}d}|r%dt|�}n||_||_ddl}|j�|_d|j_d|j_t|�|_}|jj	dddd	�t
|d
|ddd
d�|_|jj	dd�t|dd�|_
}|j	dddd�t|dtdtd|��ddd||f�|_}	|	j	dddd	dd�|	j|d<|j|	d<t|	�|_}
|	jddd|
dd�|_|j|�dS(Nii(ii�i<ROiRKRPR9tborderwidthitrelieftgrooveRLtnametvbarRBtrighttyRNi,tscrollregionRCR;tyscrollcommandtwindowR7tnw(R�R�ttitletreprtReprt	maxstringtmaxotherRWRRYRyR�t	ScrollbarR�tCanvastmintmaxtcanvastyviewRktsubframet
create_windowtsfidR�(R	R�R�tdictR�RNR�RR�R�R�((s&/sys/lib/python2.7/idlelib/Debugger.pyR�s2		!	

!i�icCs�||jkr|rdS|j}|j}x!|jj�D]}|j�q<Wd|_|s�t|dd�}|jdddd�n�|j	�}|j
�d}	x�|D]�}
||
}|jj|�}|r�dd!}nt|d|
�}|jd|	dddd	�t|d
ddd�}|j
d|�|jd|	dddd	�|	d}	q�W||_|j�|j�}
|j�}|j}dd|
|f|jd<|d
kr�d
|d<|jdd�n||d<|jdd�dS(NR9R'RFiRGii�tstickyR�R�R�R�i,RNRO(R�R�RtchildrentvaluesR3R'RyRoR�tsortR�tEntrytinserttupdate_idletaskstwinfo_reqwidthtwinfo_reqheightR�RY(R	R�R�t
rpc_clientR�RtctltnamesRFR�R�tsvalueR�RNR�((s&/sys/lib/python2.7/idlelib/Debugger.pyR��sF			


	
	

cCs|jj�dS(N(RR3(R	((s&/sys/lib/python2.7/idlelib/Debugger.pyR1�sN(R$R%R'RR�R�R1(((s&/sys/lib/python2.7/idlelib/Debugger.pyR��s*(RRttypestTkintertidlelib.WindowListRtidlelib.ScrolledListRtidlelibRRRR&R�R�(((s&/sys/lib/python2.7/idlelib/Debugger.pyt<module>s
)�T

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].