Ñò
§ÚêLc @ sO d Z d d k Z d d k 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ÿÿÿÿNc C s t i d j o
d t i j 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 Tck/Tk.
t darwins .app( t syst platformt
executable( ( ( s- /usr/lib64/python2.6/idlelib/macosxSupport.pyt runningAsOSXApp s c s# ‡ f d † } | i d | ƒ d S( s£
This ensures that the application will respont to open AppleEvents, which
makes is feaseable to use IDLE as the default application for python files.
c s" x | D] } ˆ i | ƒ q Wd S( N( t open( t argst fn( t flist( s- /usr/lib64/python2.6/idlelib/macosxSupport.pyt
doOpenFile s s ::tk::mac::OpenDocumentN( t
createcommand( t rootR R ( ( R s- /usr/lib64/python2.6/idlelib/macosxSupport.pyt addOpenEventSupport s c C s4 y | i i d d ƒ Wn t i j
o n Xd S( Nt consolet hide( t tkt callt Tkintert TclError( R ( ( s- /usr/lib64/python2.6/idlelib/macosxSupport.pyt
hideTkConsole s c s” d d k l } l } l } d d k l } l } d d k l } d d k l ‰ d d k l
} | ˆ ƒ } ˆ i d | ƒ h } | | d d ƒ| d <}
| i d
d d |
d d
ƒ |
‡ f d † } ˆ i
| ƒ | | d d ƒ| d <}
| i d
d d |
ƒ d! ‡ f d † } d! ‡ ‡ f d † }
ˆ i d | ƒ ˆ i d |
ƒ ˆ o ˆ i d ˆ i ƒ n ˆ i i d ƒ } t t t | i d ƒ ƒ ƒ d" j o- d d# d! g f | i d
<ˆ i d |
ƒ n¿ x» | i D]° \ } } | i | ƒ }
|
p qÜqÜx„ | D]| } | p |
i ƒ q| \ } } | | ƒ \ } } | | i | ƒ } ˆ | d „ } |
i d
| d | d | d | ƒ qWqÜWd! S($ sU
Replace the Tk root menu by something that's more appropriate for
IDLE.
iÿÿÿÿ( t Menut TextR ( t prepstrt get_accelerator( t Bindings( t
WindowList( t MultiCallCreatort menut namet windowst labelt Windowt underlinei c sX | i d ƒ } | d j o
d } n | d j o | i d | ƒ n ˆ i | ƒ d S( Nt endiÿÿÿÿi ( t indext Nonet deletet add_windows_to_menu( R R! ( R ( s- /usr/lib64/python2.6/idlelib/macosxSupport.pyt postwindowsmenuB s
t applet applicationt IDLEc s$ d d k l } | i ˆ d ƒ d S( Niÿÿÿÿ( t aboutDialogs
About IDLE( t idlelibR* t AboutDialog( t eventR* ( R ( s- /usr/lib64/python2.6/idlelib/macosxSupport.pyt about_dialogO s c s0 d d k l } ˆ i ˆ _ | i ˆ d ƒ d S( Niÿÿÿÿ( t configDialogt Settings( R+ R/ t inversedictt
instance_dictt ConfigDialog( R- R/ ( R R ( s- /usr/lib64/python2.6/idlelib/macosxSupport.pyt
config_dialogS s s <