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

Njf@sddlZddlZddlZddlZddlmZmZddlm	Z	m
Z
mZdddZGddde
Z
Gdd	d	e
ZGd
ddeZdd
ZedkrddlmZeddddddlmZeedS)N)ObjectTreeItemmake_objecttreeitem)TreeNodeTreeItemScrolledCanvascCsT|dkrt|}t|dddatjjdddt||attj	dta
t
dS)NZwhiter)ZbgZhighlightthicknessZboth)expandZfill)tkToplevelrZscframeZpack
StackTreeItemitemrZcanvasZnoder)rootflisttbtopr8/opt/alt/python37/lib64/python3.7/idlelib/stackviewer.pyStackBrowser
s

rc@s6eZdZdddZddZddZdd	Zd
dZdS)
rNcCs ||_|||_||_dS)N)r	get_stackstack
get_exceptiontext)selfrrrrr__init__szStackTreeItem.__init__cCsP|dkrtj}g}|r&|jdkr&|j}x$|dk	rJ||j|jf|j}q(W|S)N)syslast_tracebacktb_frametb_nextappend	tb_lineno)rrrrrrrs

zStackTreeItem.get_stackcCs@tj}tj}t|dr|j}t|}|dk	r<|dt|}|S)N__name__z: )r	last_type
last_valuehasattrr!str)rtypevaluesrrrr's
zStackTreeItem.get_exceptioncCs|jS)N)r)rrrrGetText1szStackTreeItem.GetTextcCs.g}x$|jD]}t||j}||qW|S)N)r
FrameTreeItemrr)rsublistinfor
rrr
GetSubList4s
zStackTreeItem.GetSubList)NN)r!
__module____qualname__rrrr)r-rrrrrs


rc@s,eZdZddZddZddZddZd	S)
r*cCs||_||_dS)N)r,r)rr,rrrrr>szFrameTreeItem.__init__c	Cs||j\}}y|jd}Wnd}YnX|j}|j}|j}t||}|}|dkrhd|||f}nd||||f}|S)Nr!?)r0Nz%s, line %d: %sz%s.%s(...), line %d: %s)r,	f_globalsf_codeco_filenameco_name	linecachegetlinestrip)	rrlinenomodnamecodefilenamefuncnameZ
sourceliner
rrrr)Bs


zFrameTreeItem.GetTextcCsR|j\}}g}|j|jk	r4td|j|j}||td|j|j}|||S)Nz<locals>z	<globals>)r,r2f_localsVariablesTreeItemrr)rrr9r+r
rrrr-Ts


zFrameTreeItem.GetSubListcCs6|jr2|j\}}|jj}tj|r2|j||dS)N)rr,r3r4ospathisfileZgotofileline)rrr9r<rrr
OnDoubleClick^s

zFrameTreeItem.OnDoubleClickN)r!r.r/rr)r-rCrrrrr*<s
r*c@s,eZdZddZddZddZddZd	S)
r?cCs|jS)N)Z	labeltext)rrrrr)hszVariablesTreeItem.GetTextcCsdS)Nr)rrrrGetLabelTextkszVariablesTreeItem.GetLabelTextcCst|jdkS)Nr)lenobject)rrrrIsExpandablenszVariablesTreeItem.IsExpandablec	Cslg}xb|jD]T}y|j|}Wntk
r8wYnX||jfdd}t|d||}||qW|S)NcSs|||<dS)Nr)r'keyrFrrrsetfunctionxsz1VariablesTreeItem.GetSubList.<locals>.setfunctionz =)rFkeysKeyErrorrr)rr+rHr'rIr
rrrr-qszVariablesTreeItem.GetSubListN)r!r.r/r)rDrGr-rrrrr?fsr?c	Csddlm}t|}|dtt|ddd\}}|d|d|df||}yt	Wn"t
k
rt\}}}YnX|t_
|t_|t_t||||d	t`
t`t`dS)
Nr)PyShellFileListzTest StackViewer+rz+%d+%d2)rrr)Zidlelib.pyshellrLr	r
titlemapintZgeometrysplitZintentional_name_error	NameErrorrexc_infor"r#rr)	parentrLrxyrexc_type	exc_valueZexc_tbrrr
_stack_viewers"

 r[__main__)mainz"idlelib.idle_test.test_stackviewerF)	verbosityexit)run)NNN)r6r@rZtkinterr	Zidlelib.debugobjrrZidlelib.treerrrrrr*r?r[r!Zunittestr]Zidlelib.idle_test.htestrarrrr<module>s
'*