⚝
One Hat Cyber Team
⚝
Your IP:
3.145.157.63
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
python38
/
lib
/
python3.8
/
idlelib
/
__pycache__
/
View File Name :
macosx.cpython-38.opt-1.pyc
U ���O%B�V��������������������@���s����d�Z�ddlmZ�ddlZddlmZ�ddlZdadd��Zdd��Z d d ��Z dd��Zd d��Zdd��Z dd��Zdd��Zdd��Zdd��Zdd��Zdd��Zdd��Zedkr�dd lmZ�ed!d"d#��dS�)$z3 A number of functions that enhance IDLE on macOS. �����)� expanduserN)�platformc������������������C���sj���t�dkrbt���}�|�j�dd�}d|kr,dan,d|kr:dand|�j�d d d�krTdand a|�����ndadS�)zl Initializes OS X Tk variant values for isAquaTk(), isCarbonTk(), isCocoaTk(), and isXQuartz(). �darwin�tkZwindowingsystemZx11�xquartzZaqua�otherZAppKitZwinfoZserver�.�cocoa�carbonN)r����tkinterZTkr����call�_tk_typeZdestroy)�rootZws��r����-/opt/python38/lib/python3.8/idlelib/macosx.py� _init_tk_type���s���� r���c�������������������C���s���t�s t���t�dkpt�dkS�)zK Returns True if IDLE is using a native OS X Tk (Cocoa or Carbon). r ���r ����r ���r���r���r���r���r����isAquaTk%���s����r���c�������������������C���s���t�s t���t�dkS�)zb Returns True if IDLE is using a Carbon Aqua Tk (instead of the newer Cocoa Aqua Tk). r ���r���r���r���r���r���� isCarbonTk-���s����r���c�������������������C���s���t�s t���t�dkS�)z8 Returns True if IDLE is using a Cocoa Aqua Tk. r ���r���r���r���r���r���� isCocoaTk6���s����r���c�������������������C���s���t�s t���t�dkS�)z7 Returns True if IDLE is using an OS X X11 Tk. r���r���r���r���r���r���� isXQuartz>���s����r���c�����������������C���s2���t���r*|�j�dd�}|dkr dS�d�|�S�dS�dS�)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 http://www.python.org/download/mac/tcltk/ for current information.N)r���r���r����format)r���r���r���r���r����tkVersionWarningG���s���� �r���c��������������� ���C���s^���t�dkrdS�td�}�z.t|�d��}t�|�W��5�Q�R���W�S�Q�R�X�W�n�tk rX���Y�dS�X�dS�)z- Fetch the macOS system preferences. r���Nz.~/Library/Preferences/.GlobalPreferences.plist�rb)r���r����open�plistlib�load�OSError)Z plist_pathZ plist_filer���r���r����readSystemPreferences\���s����"r ���c������������������C���s,���t�dkrdS�t��}�|�r(|��d�dkr(dS�dS�)zJ Warn if "Prefer tabs when opening documents" is set to "Always". r���NZAppleWindowTabbingMode�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).)r���r ����get)Zprefsr���r���r����preferTabsPreferenceWarningk���s�����r#���c��������������������s�����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. c���������������������s���|�D�]}����|��qd�S�)N)r���)�args�fn��flistr���r���� doOpenFile����s����z'addOpenEventSupport.<locals>.doOpenFilez::tk::mac::OpenDocumentN)� createcommand)r���r'���r(���r���r&���r����addOpenEventSupport���s����r*���c�����������������C���s.���z|�j��dd��W�n�tjk r(���Y�nX�d�S�)NZconsoleZhide)r���r���r���ZTclError�r���r���r���r���� hideTkConsole����s����r,���c��������������������s���ddl�m}�ddlm}�ddlm��|jd�d�d�}|jd�d�dd�=�|jd�d��d |��|jd �d�dd�=�|jd�d�dd�=�|��}�j|d��i�}||d dd��|d <�}|jd|dd��|f�fdd� }�� |��d%�fdd� } d&���fdd� } d'�fdd� }�� d| ���� d| ����d| �����rR�� d��j����d��j��t ���r�||ddd��|d<�}|jd |d!��|j�ddd"dgf��t���rĈ�d#| ����d$|��|jd �d�d=�dS�)(zf Replace the Tk root menu by something that is more appropriate for IDLE with an Aqua Tk. r���)�Menu)�mainmenu��window����������N�����������)�menur0���)�nameZtearoffZWindow)�labelr7���Z underlinec��������������������s8���|���d�}|d�krd}|dkr*|��d|�����|���d�S�)N�endr5���r���)�index�deleteZadd_windows_to_menu)r7���r:���r/���r���r����postwindowsmenu����s���� z)overrideRootMenu.<locals>.postwindowsmenuc��������������������s���ddl�m}�|�����dS�)zHandle Help 'About IDLE' event.r���)� help_aboutN)�idlelibr>���ZAboutDialog)�eventr>���r+���r���r����about_dialog����s����z&overrideRootMenu.<locals>.about_dialogc��������������������s$���ddl�m}���j�_|��d��dS�)z&Handle Options 'Configure IDLE' event.r���)�configdialogZSettingsN)r?���rB���ZinversedictZ instance_dictZConfigDialog)r@���rB���)r'���r���r���r���� config_dialog����s����z'overrideRootMenu.<locals>.config_dialogc��������������������s���ddl�m}�|�����dS�)zHandle Help 'IDLE Help' event.r���)�helpN)r?���rD���Z show_idlehelp)r@���rD���r+���r���r����help_dialog����s����z%overrideRootMenu.<locals>.help_dialog�<<about-idle>>z<<open-config-dialog>>z::tk::mac::ShowPreferencesz<<close-all-windows>>�exitZappleZapplicationZIDLE)r9���r7���)z About IDLErF���Z tkAboutDialogz::tk::mac::ShowHelp)N)N)N)r���r-���r?���r.���r0���Zmenudefs�insertZ configureZadd_cascadeZregister_callback�bindr)���Zclose_all_callbackr���r���)r���r'���r-���r.���Z closeItemZmenubarZmenudictr7���r=���rA���rC���rE���r���)r'���r���r0���r����overrideRootMenu����sN���� ���rJ���c�����������������C���s(���|���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. ZTextz<B2>z<B2-Motion>z<<PasteSelection>>N)Zunbind_classr+���r���r���r����fixb2context����s����rK���c�����������������C���s.���t���r*t|���t|�|��t|�|��t|���dS�)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���r,���rJ���r*���rK���)r���r'���r���r���r����setupApp��s ���� rL����__main__)�mainzidlelib.idle_test.test_macosxr6���)� verbosity)�__doc__Zos.pathr���r����sysr���r���r ���r���r���r���r���r���r���r ���r#���r*���r,���rJ���rK���rL����__name__ZunittestrN���r���r���r���r����<module>���s*��� h