ok

Mini Shell

Direktori : /opt/alt/python36/lib64/python3.6/idlelib/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/idlelib/__pycache__/macosx.cpython-36.opt-2.pyc

3

��2a�%�@s�ddlmZddlZddlmZddlZdadd�Zdd�Zdd	�Z	d
d�Z
dd
�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zedkr�ddlmZed d!d"�dS)#�)�
expanduserN)�platformcCsjtdkrbtj�}|jjdd�}d|kr,dan,d|kr:dand|jjd	d
d�krTdand
a|j�ndadS)N�darwin�tkZwindowingsystemZx11�xquartzZaqua�otherZAppKitZwinfoZserver�.�cocoa�carbon)r�tkinterZTkr�call�_tk_typeZdestroy)�rootZws�r�+/opt/alt/python36/lib64/python3.6/macosx.py�
_init_tk_types
rcCsts
t�tdkptdkS)Nr	r
)r
rrrrr�isAquaTk%srcCsts
t�tdkS)Nr
)r
rrrrr�
isCarbonTk-srcCsts
t�tdkS)Nr	)r
rrrrr�	isCocoaTk6srcCsts
t�tdkS)Nr)r
rrrrr�	isXQuartz>srcCs2t�r*|jjdd�}|dkr dSdj|�SdSdS)N�info�
patchlevel�8.5.7�8.5.9Fz�WARNING: The version of Tcl/Tk ({0}) in use may be unstable.
Visit http://www.python.org/download/mac/tcltk/ for current information.)rr)rrr�format)rrrrr�tkVersionWarningGs	rcCsNtdkrdStd�}y t|d��}tj|�SQRXWntk
rHdSXdS)Nrz.~/Library/Preferences/.GlobalPreferences.plist�rb)rr�open�plistlib�load�OSError)Z
plist_pathZ
plist_filerrr�readSystemPreferences\sr!cCs,tdkrdSt�}|r(|jd�dkr(dSdS)NrZAppleWindowTabbingMode�alwaysz�WARNING: The system preference "Prefer tabs when opening documents" is set to "Always". This will cause various problems with IDLE. For the best experience, change this setting when running IDLE (via System Preferences -> Dock).)rr!�get)Zprefsrrr�preferTabsPreferenceWarningksr$cs�fdd�}|jd|�dS)Ncsx|D]}�j|�qWdS)N)r)�args�fn)�flistrr�
doOpenFile�s
z'addOpenEventSupport.<locals>.doOpenFilez::tk::mac::OpenDocument)�
createcommand)rr'r(r)r'r�addOpenEventSupportsr*cCs.y|jjdd�Wntjk
r(YnXdS)NZconsoleZhide)rrrZTclError)rrrr�
hideTkConsole�sr+cs�ddlm}ddlm}ddlm�|jddd"}|jddd#d�=|jddjd|�|jd$ddd�=|jd%dd=|��}�j|d	�i}||d
dd�|d
<}|jd|dd
�|f�fdd�	}�j	|�d&�fdd�	}	d'��fdd�	}
d(�fdd�	}�j
d|	��j
d|
��jd|
���rN�j
d�j��jd�j�t
��r�||ddd�|d<}|jd|d�|jjddd)dgf�t��r��jd |	��jd!|�|jd*dd=dS)+Nr)�Menu)�mainmenu)�window����)�menur.)�nameZtearoffZWindow)�labelr3Z	underlinecs8|jd�}|dkrd}|dkr*|jd|��j|�dS)N�endr/r���)�index�deleteZadd_windows_to_menu)r3r6)r.rr�postwindowsmenu�s
z)overrideRootMenu.<locals>.postwindowsmenucsddlm}|j��dS)Nr)�
help_about)�idlelibr;ZAboutDialog)�eventr;)rrr�about_dialog�sz&overrideRootMenu.<locals>.about_dialogcs$ddlm}�j�_|j�d�dS)Nr)�configdialogZSettings)r<r?ZinversedictZ
instance_dictZConfigDialog)r=r?)r'rrr�
config_dialog�sz'overrideRootMenu.<locals>.config_dialogcsddlm}|j��dS)Nr)�help)r<rAZ
show_idlehelp)r=rA)rrr�help_dialog�sz%overrideRootMenu.<locals>.help_dialog�<<about-idle>>z<<open-config-dialog>>z::tk::mac::ShowPreferencesz<<close-all-windows>>�exitZappleZapplicationZIDLE)r5r3�
About IDLEZ
tkAboutDialogz::tk::mac::ShowHelp������r7rF)N)N)N)rErCr7)rr,r<r-r.Zmenudefs�insertZ	configureZadd_cascadeZregister_callbackZbindr)Zclose_all_callbackrr)rr'r,r-Z	closeItemZmenubarZmenudictr3r:r>r@rBr)r'rr.r�overrideRootMenu�sH

rIcCs(|jdd�|jdd�|jdd�dS)NZTextz<B2>z<B2-Motion>z<<PasteSelection>>)Zunbind_class)rrrr�fixb2context�srJcCs.t�r*t|�t||�t||�t|�dS)N)rr+rIr*rJ)rr'rrr�setupApps


rK�__main__)�mainzidlelib.idle_test.test_macosxr0)�	verbosity)Zos.pathrr�sysrrr
rrrrrrr!r$r*r+rIrJrK�__name__ZunittestrMrrrr�<module>s(		h


Zerion Mini Shell 1.0