Your IP : 3.145.89.181
3
� ff � @ s� d dl Z d dlZd dlZd dlZd dlmZmZ d dlm Z m
Z
mZ ddd�ZG dd� de
�Z
G dd � d e
�ZG d
d� de�Zdd
� Zedkr�d dlmZ edddd� d dlmZ ee� dS )� N)�ObjectTreeItem�make_objecttreeitem)�TreeNode�TreeItem�ScrolledCanvasc C sT |d krt j| �}t|ddd�atjjddd� t||�attj d t�a
t
j� d S )NZwhiter )ZbgZhighlightthickness� Zboth)�expandZfill)�tk�Toplevelr Zsc�frameZpack�
StackTreeItem�itemr ZcanvasZnoder )�root�flist�tb�top� r �8/opt/alt/python36/lib64/python3.6/idlelib/stackviewer.py�StackBrowser
s
r c @ s6 e Zd Zddd�Zdd� Zdd� Zdd � Zd
d� ZdS )
r Nc C s || _ | j|�| _| j� | _d S )N)r � get_stack�stack�
get_exception�text)�selfr r r r r �__init__ s zStackTreeItem.__init__c C sP |d krt j}g }|r&|jd kr&|j}x$|d k rJ|j|j|jf� |j}q(W |S )N)�sys�last_traceback�tb_frame�tb_next�append� tb_lineno)r r r r r r r s
zStackTreeItem.get_stackc C s@ t j}t j}t|d�r|j}t|�}|d k r<|d t|� }|S )N�__name__z: )r � last_type�
last_value�hasattrr! �str)r �type�value�sr r r r '