//usr/lib64/lib64//lib64/lib64//ó
ÛœSec @ s} d Z d d l Z d d l Z d d l m Z d a d „ Z d a d „ Z d „ Z
d „ Z d „ Z d „ Z
d
„ Z d S( s
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( t pathc C s1 t d k r- t j d k o' d t j k a n t S( s›
Returns True if Python is running from within an app on OSX.
If so, assume that Python was built with Aqua Tcl/Tk rather than
X11 Tcl/Tk.
t darwins .appN( t
_appbundlet Nonet syst platformt
executable( ( ( s- /usr/lib64/python2.7/idlelib/macosxSupport.pyt runningAsOSXApp s !c 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( sb
Returns True if IDLE is using a Carbon Aqua Tk (instead of the
newer Cocoa Aqua Tk).
t aquat tkt windowingsystemt AppKitt winfot servert .N( t
_carbonaquatkR R R t call( t root( ( s- /usr/lib64/python2.7/idlelib/macosxSupport.pyt isCarbonAquaTk s
!c C sa t ƒ rY d | j j d d d ƒ k rY | j j d d ƒ } | d k rL t Sd j | ƒ St Sd
S( s2
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.
R R R
R t infot
patchlevels 8.5.7s 8.5.9s† WARNING: The version of Tcl/Tk ({0}) in use may be unstable.\nVisit http://www.python.org/download/mac/tcltk/ for current information.N( s 8.5.7s 8.5.9( R R R t Falset format( R R ( ( s- /usr/lib64/python2.7/idlelib/macosxSupport.pyt tkVersionWarning% s c s# ‡ f d † } | j d | ƒ d S( s¢
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" x | D] } ˆ j | ƒ q Wd S( N( t open( t argst fn( t flist( s- /usr/lib64/python2.7/idlelib/macosxSupport.pyt
doOpenFile? s
s ::tk::mac::OpenDocumentN( t
createcommand( R R R ( ( R s- /usr/lib64/python2.7/idlelib/macosxSupport.pyt addOpenEventSupport: s c C s2 y | j j d d ƒ Wn t j k
r- n Xd S( Nt consolet hide( R R t Tkintert TclError( R ( ( s- /usr/lib64/python2.7/idlelib/macosxSupport.pyt
hideTkConsoleH s c sV d d l m } m } m } d d l m } m } d d l m } d d l m ‰ d d l m
} | ˆ ƒ } ˆ j d | ƒ i } | | d d ƒ| d <}
| j d
d d |
d d
ƒ |
‡ f d † } ˆ j
| ƒ d$ ‡ f d † } d$ ‡ ‡ f d † }
d$ ‡ f d † } ˆ j d | ƒ ˆ j d |
ƒ ˆ j d |
ƒ ˆ rqˆ j d ˆ j ƒ ˆ j d ˆ j ƒ n t ˆ ƒ r | | d d ƒ| d <}
| j d
d d |
ƒ | j j d
d d% d$ g f ƒ ˆ j j d ƒ } t t t | j d ƒ ƒ ƒ d&