Your IP : 216.73.216.85


Current Path : /opt/alt/python310/lib64/python3.10/idlelib/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/idlelib/__pycache__/filelist.cpython-310.pyc

o

0�i$�@sVdZddlZddlmZGdd�d�Zdd�Zedkr)dd	lmZed
dd�dSdS)
zidlelib.filelist�N)�
messageboxc@s^eZdZddlmZdd�Zddd�Zddd	�Zdd
d�Zdd
�Z	dd�Z
dd�Zdd�ZdS)�FileListr��EditorWindowcCs||_i|_i|_i|_dS�N)�root�dict�inversedict�vars)�selfr�r�7/opt/alt/python310/lib64/python3.10/idlelib/filelist.py�__init__s
zFileList.__init__NcCs�|sJ�|�|�}tj�|�rtjdd|f|jd�dStj�|�}||jvr4|j|}|j	�
�|S|r:||�S|�|||�}|jrF|S|�
�dS)Nz
File Errorz%r is a directory.�Zmaster)�canonize�os�path�isdirr�	showerrorr�normcaser�top�wakeuprZ	good_loadZ_close)r�filename�action�key�editrrr
�opens*
�


z
FileList.opencCs0|�|�}|dur|dur|�|�dSdSdSr)rZgotoline)rr�linenorrrr
�gotofileline,s
�zFileList.gotofilelinecCs|�||�Srr)rrrrr
�new1szFileList.newcOs*t|j�D]
}|��}|dkrdSqdS)NZcancel�break)�listr	�close)r�args�kwdsrZreplyrrr
�close_all_callback4s�zFileList.close_all_callbackcCsXz|j|}Wntytd�YdSw|r|j|=|j|=|js*|j��dSdS)Nz-Don't know this EditorWindow object.  (close))r	�KeyError�printrr�quit)rrrrrr
�unregister_maybe_terminate;s��z#FileList.unregister_maybe_terminatecCs�|��z|j|}Wntytd�YdSw|jj}|s-|r&|j|=d|j|<dS|�|�}tj	�
|�}||kr>dS||jvrY|j|}d|j|<tjdd|f|j
d�||j|<||j|<|rwz|j|=WdStyvYdSwdS)Nz.Don't know this EditorWindow object.  (rename)z
Name Conflictz.You now have multiple edit windows open for %rr)Zsaved_change_hookr	r&r'�iorrrrrrrrr)rrrrZnewkeyZconflictrrr
�filename_changed_editGsD�




�

��zFileList.filename_changed_editcCsFtj�|�szt��}Wn	tyYnwtj�||�}tj�|�Sr)rr�isabs�getcwd�OSError�join�normpath)rr�pwdrrr
rgs�zFileList.canonizer)
�__name__�
__module__�__qualname__�idlelib.editorrrrrrr%r)r+rrrrr
rs


 rcCshddlm}ddlm}ddlm}|�}||�||�|��t|�}|��|j	r2|�
�dSdS)Nr)�Tk)�
fixwordbreaks)�fix_scaling)�tkinterr6r5r7Zidlelib.runr8Zwithdrawrrr	Zmainloop)r6r7r8rZflistrrr
�_testrs�r:�__main__)�mainzidlelib.idle_test.test_filelist�)�	verbosity)	�__doc__rr9rrr:r2Zunittestr<rrrr
�<module>sk
�