Hacked By AnonymousFox

Current Path : /opt/alt/python33/lib64/python3.3/idlelib/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/idlelib/__pycache__/macosxSupport.cpython-33.pyo

�
��fc@s�dZddlZddlZddlmZdadd�Zdadd�Z	dd	�Z
d
d�Zdd
�Zdd�Z
dd�ZdS(u
A number of function that enhance IDLE on MacOSX when it used as a normal
GUI application (as opposed to an X11 application).
iN(upathcCsLtdkrHtjdkatrHddl}t|jd��aqHntS(u�
    Returns True if Python is running from within an app on OSX.
    If so, the various OS X customizations will be triggered later (menu
    fixup, et al).  (Originally, this test was supposed to condition
    behavior on whether IDLE was running under Aqua Tk rather than
    under X11 Tk but that does not work since a framework build
    could be linked with X11.  For several releases, this test actually
    differentiates between whether IDLE is running from a framework or
    not.  As a future enhancement, it should be considered whether there
    should be a difference based on framework and any needed X11 adaptions
    should be made dependent on a new function that actually tests for X11.)
    udarwiniNuPYTHONFRAMEWORK(u
_appbundleuNoneusysuplatformu	sysconfigubooluget_config_var(u	sysconfig((u:/opt/alt/python33/lib64/python3.3/idlelib/macosxSupport.pyurunningAsOSXAppsurunningAsOSXAppcCsUtdkrQt�oKd|jjdd�koKd|jjddd�kantS(	ub
    Returns True if IDLE is using a Carbon Aqua Tk (instead of the
    newer Cocoa Aqua Tk).
    uaquautkuwindowingsystemuAppKituwinfouserveru.N(u
_carbonaquatkuNoneurunningAsOSXApputkucall(uroot((u:/opt/alt/python33/lib64/python3.3/idlelib/macosxSupport.pyuisCarbonAquaTk#s
	!uisCarbonAquaTkcCsat�rYd|jjddd�krY|jjdd�}|dkrLdSd	j|�SdSd
S(
u2
    Returns a string warning message if the Tk version in use appears to
    be one known to cause problems with IDLE.
    1. Apple Cocoa-based Tk 8.5.7 shipped with Mac OS X 10.6 is unusable.
    2. Apple Cocoa-based Tk 8.5.9 in OS X 10.7 and 10.8 is better but
        can still crash unexpectedly.
    uAppKituwinfouserveru.uinfou
patchlevelu8.5.7u8.5.9u�WARNING: The version of Tcl/Tk ({0}) in use may be unstable.\nVisit http://www.python.org/download/mac/tcltk/ for current information.N(u8.5.7u8.5.9F(urunningAsOSXApputkucalluFalseuformat(urootu
patchlevel((u:/opt/alt/python33/lib64/python3.3/idlelib/macosxSupport.pyutkVersionWarning/s		utkVersionWarningcs&�fdd�}|jd|�dS(u�
    This ensures that the application will respond to open AppleEvents, which
    makes is feasible to use IDLE as the default application for python files.
    cs"x|D]}�j|�qWdS(N(uopen(uargsufn(uflist(u:/opt/alt/python33/lib64/python3.3/idlelib/macosxSupport.pyu
doOpenFileIs
u'addOpenEventSupport.<locals>.doOpenFileu::tk::mac::OpenDocumentN(u
createcommand(urootuflistu
doOpenFile((uflistu:/opt/alt/python33/lib64/python3.3/idlelib/macosxSupport.pyuaddOpenEventSupportDsuaddOpenEventSupportcCs3y|jjdd�Wntjk
r.YnXdS(Nuconsoleuhide(utkucallutkinteruTclError(uroot((u:/opt/alt/python33/lib64/python3.3/idlelib/macosxSupport.pyu
hideTkConsoleRsu
hideTkConsolecsbddlm}m}m}ddlm}m}ddlm}ddlm�ddl	m
}|��}�jd|�i}	||dd	�|	d	<}
|jd
dd|
dd�|
�fd
d�}�j
|�d'�fdd�}d'��fdd�}
d'�fdd�}�jd|��jd|
��jd|
��r}�jd�j��jd�j�nt��r,||dd�|	d<}
|jd
dd|
�|jjddd(d'gf��jjd�}ttt|jd���d)kr^|jdd#jd*�q^n2�jd%|��jd&|�|jd+d#d=d'S(,uU
    Replace the Tk root menu by something that's more appropriate for
    IDLE.
    i(uMenuuTextuText(uprepstruget_accelerator(uBindings(u
WindowList(uMultiCallCreatorumenuunameuwindowsulabeluWindowu	underlinecsT|jd�}|dkr$d}n|dkrC|jd|�n�j|�dS(Nuendiii����(uindexuNoneudeleteuadd_windows_to_menu(umenuuend(u
WindowList(u:/opt/alt/python33/lib64/python3.3/idlelib/macosxSupport.pyupostwindowsmenuvs	u)overrideRootMenu.<locals>.postwindowsmenucs$ddlm}|j�d�dS(Ni(uaboutDialogu
About IDLE(uidlelibuaboutDialoguAboutDialog(ueventuaboutDialog(uroot(u:/opt/alt/python33/lib64/python3.3/idlelib/macosxSupport.pyuabout_dialog�su&overrideRootMenu.<locals>.about_dialogcs<ddlm}�j�_�j�_|j�d�dS(Ni(uconfigDialoguSettings(uidlelibuconfigDialoguinversedictu
instance_dictuConfigDialog(ueventuconfigDialog(uflisturoot(u:/opt/alt/python33/lib64/python3.3/idlelib/macosxSupport.pyu
config_dialog�su'overrideRootMenu.<locals>.config_dialogcsKddlm}tjtjtjt��d�}|j�d|�dS(Ni(utextViewuhelp.txtuHelp(uidlelibutextViewupathujoinuabspathudirnameu__file__u	view_file(ueventutextViewufn(uroot(u:/opt/alt/python33/lib64/python3.3/idlelib/macosxSupport.pyuhelp_dialog�s$u%overrideRootMenu.<locals>.help_dialogu<<about-idle>>u<<open-config-dialog>>u::tk::mac::ShowPreferencesu<<close-all-windows>>uexituappleuapplicationuIDLEu
About IDLEuinfo patchlevelu.iiiiu_Preferences....u
tkAboutDialogu::tk::mac::ShowHelpN(u
About IDLEu<<about-idle>>(iii(u_Preferences....u<<open-config-dialog>>i����(utkinteruMenuuTextuidlelib.EditorWindowuprepstruget_acceleratoruidlelibuBindingsu
WindowListuidlelib.MultiCalluMultiCallCreatoru	configureuadd_cascadeuregister_callbackuNoneubindu
createcommanduclose_all_callbackuisCarbonAquaTkumenudefsuinsertutkuevalutupleumapuintusplituappend(urootuflistuMenuuTextuprepstruget_acceleratoruBindingsuMultiCallCreatorumenubarumenudictumenuupostwindowsmenuuabout_dialogu
config_dialoguhelp_dialogu	tkversion((u
WindowListuflisturootu:/opt/alt/python33/lib64/python3.3/idlelib/macosxSupport.pyuoverrideRootMenuYsF

$
uoverrideRootMenucCs5t�s
dSt|�t||�t||�dS(u7
    Perform setup for the OSX application bundle.
    N(urunningAsOSXAppu
hideTkConsoleuoverrideRootMenuuaddOpenEventSupport(urootuflist((u:/opt/alt/python33/lib64/python3.3/idlelib/macosxSupport.pyusetupApp�s
	

usetupApp(u__doc__usysutkinteruosupathuNoneu
_appbundleurunningAsOSXAppu
_carbonaquatkuisCarbonAquaTkutkVersionWarninguaddOpenEventSupportu
hideTkConsoleuoverrideRootMenuusetupApp(((u:/opt/alt/python33/lib64/python3.3/idlelib/macosxSupport.pyu<module>s^

Hacked By AnonymousFox1.0, Coded By AnonymousFox