Your IP : 3.135.208.236
3
� f8 � @ sR d Z ddlZddlmZ G dd� d�Zdd� ZedkrNdd lm Z e d
dd� dS )
zidlelib.filelist� N)�
messageboxc @ s^ e Zd ZddlmZ dd� Zddd�Zddd �Zdd
d�Zdd
� Z dd� Z
dd� Zdd� ZdS )�FileListr )�EditorWindowc C s || _ i | _i | _i | _d S )N)�root�dict�inversedict�vars)�selfr � r
�5/opt/alt/python36/lib64/python3.6/idlelib/filelist.py�__init__ s zFileList.__init__Nc C s� |st �| j|�}tjj|�r:tjdd|f | jd� d S tjj|�}|| j krh| j | }|j
j� |S |rt||�S | j| ||�}|j
r�|S |j� d S d S )Nz
File Errorz%r is a directory.)�master)�AssertionError�canonize�os�path�isdir�tkMessageBox� showerrorr �normcaser �top�wakeupr Z good_loadZ_close)r �filename�action�key�editr
r
r �open s(
z
FileList.openc C s( | j |�}|d k r$|d k r$|j|� d S )N)r Zgotoline)r r �linenor r
r
r �gotofileline, s
zFileList.gotofilelinec C s | j | |�S )N)r )r r r
r
r �new1 s zFileList.newc O s* x$t | j�D ]}|j� }|dkrP qW dS )NZcancel�break)�listr �close)r �args�kwdsr Zreplyr
r
r �close_all_callback4 s
zFileList.close_all_callbackc C sT y| j | }W n tk
r* td� d S X |r8| j|= | j |= | j sP| jj� d S )Nz-Don't know this EditorWindow object. (close))r �KeyError�printr r �quit)r r r r
r
r �unregister_maybe_terminate; s z#FileList.unregister_maybe_terminatec C s� |j � y| j| }W n tk
r2 td� d S X |jj}|sZ|rL| j|= d | j|<