관리-도구
편집 파일: FileList.cpython-35.pyc
��Yf� � @ s[ d d l Z d d l Td d l j Z Gd d � d � Z d d � Z e d k rW e � d S)� N)�*c @ s� e Z d Z d d l m Z d d � Z d d d � Z d d d � Z d d d � Z d d � Z d d � Z d d � Z d d � Z d S)�FileListr )�EditorWindowc C s( | | _ i | _ i | _ i | _ d S)N)�root�dict�inversedict�vars)�selfr � r �5/opt/alt/python35/lib64/python3.5/idlelib/FileList.py�__init__ s zFileList.__init__Nc C s� | s t � | j | � } t j j | � rQ t j d d | f d | j �d St j j | � } | | j k r� | j | } | j j � | S| r� | | � S| j | | | � } | j r� | S| j � d Sd 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 s8 | j | � } | d k r4 | d k r4 | 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 �new0 s zFileList.newc O s7 x0 t | j � D] } | j � } | d k r Pq Wd S)NZcancel�break)�listr �close)r �args�kwdsr Zreplyr r r �close_all_callback3 s zFileList.close_all_callbackc C sh y | j | } Wn t k r3 t d � d SYn X| rD | j | =| j | =| j sd | j j � 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 s2 | j � y | j | } Wn t k r= t d � d SYn X| j j } | sq | r` | j | =d | j | <d S| j | � } t j j | � } | | k r� d S| | j k r� | j | } d | j | <t j d d | f d | j �| | j | <| | j | <| r.y | j | =Wn t k r-Yn Xd S)Nz.Don't know this EditorWindow object. (rename)z Name Conflictz.You now have multiple edit windows open for %rr )Zsaved_change_hookr r&