Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.10/idlelib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.10/idlelib/__pycache__/macosx.cpython-310.pyc
o

�9j�'�@s�dZddlmZddlZddlmZddlZdadd�Zdd�Z	d	d
�Z
dd�Zd
d�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zedkr^dd lmZed!d"d#�dSdS)$z3
A number of functions that enhance IDLE on macOS.
�)�
expanduserN)�platformcCs�tdkrUddlm}|r'ddlm}m}z|d�Wn|y&daYdSwt��}|j	�
dd	�}d
|vr9dand|vr@d
and|j	�
ddd�vrMdanda|��dSd
adS)zu Initialize _tk_type for isXyzTk functions.

    This function is only called once, when _tk_type is still None.
    �darwinr)�testing)�requires�ResourceDenied�gui�cocoaN�tk�windowingsystem�x11�xquartz�aqua�other�AppKit�winfo�server�.�carbon)r�idlelib.__init__r�test.supportrr�_tk_type�tkinter�Tkr
�call�destroy)rrr�root�ws�r�%/usr/lib/python3.10/idlelib/macosx.py�
_init_tk_types.��r cCstst�tdkptdkS)zK
    Returns True if IDLE is using a native OS X Tk (Cocoa or Carbon).
    r	r�rr rrrr�isAquaTk3sr"cC�tst�tdkS)zb
    Returns True if IDLE is using a Carbon Aqua Tk (instead of the
    newer Cocoa Aqua Tk).
    rr!rrrr�
isCarbonTk;sr$cCr#)z8
    Returns True if IDLE is using a Cocoa Aqua Tk.
    r	r!rrrr�	isCocoaTkD�r%cCr#)z7
    Returns True if IDLE is using an OS X X11 Tk.
    r
r!rrrr�	isXQuartzLr&r'cCs.t�r|j�dd�}|dvrdSd�|�SdS)a2
    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.
    �info�
patchlevel)z8.5.7z8.5.9Fz�WARNING: The version of Tcl/Tk ({0}) in use may be unstable.
Visit https://www.python.org/download/mac/tcltk/ for current information.)r%r
r�format)rr)rrr�tkVersionWarningUs	�r+cCsftdkrdStd�}zt|d��}t�|�Wd�WS1s!wYWdSty2YdSw)z-
    Fetch the macOS system preferences.
    rNz.~/Library/Preferences/.GlobalPreferences.plist�rb)rr�open�plistlib�load�OSError)�
plist_path�
plist_filerrr�readSystemPreferencesjs(��r3cCs.tdkrdSt�}|r|�d�dkr	dSdS)zJ
    Warn if "Prefer tabs when opening documents" is set to "Always".
    rN�AppleWindowTabbingMode�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).)rr3�get)�prefsrrr�preferTabsPreferenceWarningys�r8cs�fdd�}|�d|�dS)z�
    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|D]}��|�qdS�N)r-)�args�fn��flistrr�
doOpenFile�s�z'addOpenEventSupport.<locals>.doOpenFilez::tk::mac::OpenDocumentN)�
createcommand)rr=r>rr<r�addOpenEventSupport�sr@cCs,z
|j�dd�WdStjyYdSw)N�console�hide)r
rr�TclError�rrrr�
hideTkConsole�s
�rEcs�ddlm}ddlm}ddlm�|jddd}|jdddd�=|jdd�d	|�|jd
ddd�=|jdddd�=|��}�j|d�i}||d
dd�|d
<}|jd|dd�|f�fdd�	}��	|�d%�fdd�	}	d%��fdd�	}
d%�fdd�	}��
d|	���
d|
���d|
��r���
d�j���d�j�t
�r�||ddd�|d<}|jd |d!�|j�ddd"dgf�t�r��d#|	���d$|�|jd
dd=dSdS)&zf
    Replace the Tk root menu by something that is more appropriate for
    IDLE with an Aqua Tk.
    r)�Menu)�mainmenu��window�������N�����)�menurI)�name�tearoff�Window)�labelrP�	underlinecs8|�d�}|durd}|dkr|�d|���|�dS)N�endrNr)�index�delete�add_windows_to_menu)rPrVrHrr�postwindowsmenu�s
z)overrideRootMenu.<locals>.postwindowsmenuc�ddlm}|���dS)zHandle Help 'About IDLE' event.r)�
help_aboutN)�idlelibr\�AboutDialog)�eventr\rDrr�about_dialog��z&overrideRootMenu.<locals>.about_dialogcs$ddlm}�j�_|��d�dS)z&Handle Options 'Configure IDLE' event.r)�configdialog�SettingsN)r]rb�inversedict�
instance_dict�ConfigDialog)r_rb)r=rrr�
config_dialog�sz'overrideRootMenu.<locals>.config_dialogcr[)zHandle Help 'IDLE Help' event.r)�helpN)r]rh�
show_idlehelp)r_rhrDrr�help_dialog�raz%overrideRootMenu.<locals>.help_dialog�<<about-idle>>z<<open-config-dialog>>z::tk::mac::ShowPreferencesz<<close-all-windows>>�exit�apple�application�IDLE)rTrP)z
About IDLErk�
tkAboutDialogz::tk::mac::ShowHelpr9)rrFr]rGrI�menudefs�insert�	configure�add_cascade�register_callback�bindr?�close_all_callbackr$r%)rr=rFrG�	closeItem�menubar�menudictrPrZr`rgrjr)r=rrIr�overrideRootMenu�sP
����r{cCs(|�dd�|�dd�|�dd�dS)z�Removed bad AquaTk Button-2 (right) and Paste bindings.

    They prevent context menu access and seem to be gone in AquaTk8.6.
    See issue #24801.
    �Textz<B2>z<B2-Motion>z<<PasteSelection>>N)�unbind_classrDrrr�fixb2context
sr~cCs2t�rt|�t||�t||�t|�dSdS)a�
    Perform initial OS X customizations if needed.
    Called from pyshell.main() after initial calls to Tk()

    There are currently three major versions of Tk in use on OS X:
        1. Aqua Cocoa Tk (native default since OS X 10.6)
        2. Aqua Carbon Tk (original native, 32-bit only, deprecated)
        3. X11 (supported by some third-party distributors, deprecated)
    There are various differences among the three that affect IDLE
    behavior, primarily with menus, mouse key events, and accelerators.
    Some one-time customizations are performed here.
    Others are dynamically tested throughout idlelib by calls to the
    isAquaTk(), isCarbonTk(), isCocoaTk(), isXQuartz() functions which
    are initialized here as well.
    N)r"rEr{r@r~)rr=rrr�setupApps

�r�__main__)�mainzidlelib.idle_test.test_macosxrO)�	verbosity)�__doc__�os.pathrr.�sysrrrr r"r$r%r'r+r3r8r@rEr{r~r�__name__�unittestr�rrrr�<module>s.#		h
�

Youez - 2016 - github.com/yon3zu
LinuXploit