Hacked By AnonymousFox
�
��f c @ s� d Z d d l Z d d l Z d d l m Z d a d d � Z d a d d � Z d d � Z
d
d � Z d d
� Z d d � Z
d d � Z d S( u
A number of function that enhance IDLE on MacOSX when it used as a normal
GUI application (as opposed to an X11 application).
i N( u pathc C sL t d k rH t j d k a t rH d d l } t | j d � � a qH n t S( 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.)
u darwini Nu PYTHONFRAMEWORK( u
_appbundleu Noneu sysu platformu sysconfigu boolu get_config_var( u sysconfig( ( u: /opt/alt/python33/lib64/python3.3/idlelib/macosxSupport.pyu runningAsOSXApp s u runningAsOSXAppc C sU t d k rQ t � oK d | j j d d � k oK d | j j d d d � k a n t S( ub
Returns True if IDLE is using a Carbon Aqua Tk (instead of the
newer Cocoa Aqua Tk).
u aquau tku windowingsystemu AppKitu winfou serveru .N( u
_carbonaquatku Noneu runningAsOSXAppu tku call( u root( ( u: /opt/alt/python33/lib64/python3.3/idlelib/macosxSupport.pyu isCarbonAquaTk# s
!u isCarbonAquaTkc C sa t � rY d | j j d d d � k rY | j j d d � } | d k rL d 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.
u AppKitu winfou serveru .u infou
patchlevelu 8.5.7u 8.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( u 8.5.7u 8.5.9F( u runningAsOSXAppu tku callu Falseu format( u rootu
patchlevel( ( u: /opt/alt/python33/lib64/python3.3/idlelib/macosxSupport.pyu tkVersionWarning/ s u tkVersionWarningc s&