Hacked By AnonymousFox
B
YI~df � @ 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 �| �}t|ddd�atjjddd� t||�attj d t�a
t
�� d S )NZwhiter )�bgZhighlightthickness� Zboth)�expand�fill)�tk�Toplevelr Zsc�frame�pack�
StackTreeItem�itemr ZcanvasZnoder )�root�flist�tb�top� r �8/opt/alt/python37/lib64/python3.7/idlelib/stackviewer.py�StackBrowser
s
r c @ s6 e Zd Zddd�Zdd� Zdd� Zdd � Zd
d� ZdS )
r Nc C s || _ | �|�| _| �� | _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|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 '