
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
ó
{fc           @   s  d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l Z d  d l Td  d l Z d  d l Z d  d l Z d  d l	 m
 Z
 d  d l m Z d  d l m Z d  d l m Z d  d l m Z d  d l m Z d  d	 l m Z d  d
 l m Z m Z m Z d  d l m Z d  d l m Z d Z d e j ƒ  Z d „  Z e d „ Z d e f d „  ƒ  YZ e ƒ  Z  d e f d „  ƒ  YZ! d „  Z" d „  Z# d  d l$ Z$ e$ Z% [$ d e f d „  ƒ  YZ& d „  Z' i d d 6d d 6d d 6Z( d  „  Z) d! „  Z* d" „  Z+ e, d# k rd  d$ l- m. Z. e. e+ ƒ n  d S(%   iÿÿÿÿN(   t   *(   t   MultiCallCreator(   t
   WindowList(   t   SearchDialog(   t
   GrepDialog(   t   ReplaceDialog(   t   PyParse(   t   idleConf(   t   aboutDialogt   textViewt   configDialog(   t   macosxSupport(   t   helpi   s    (%s)c          C   s�   t  j \ }  } } } } d |  | f } | rB | d | f 7} n  | d k rb | d | f 7} n' | d k r‰ | d | d | f 7} n  | S(   sY   Format sys.version_info to produce the Sphinx version string used to install the chm docss   %s%ss   %st	   candidates   rc%st   finali    (   t   syst   version_info(   t   majort   minort   microt   levelt   serialt   release(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   _sphinx_version   s    c   
      C   sS  d } x« |  j d ƒ D]š } | d k	 r5 | j ƒ  n  t j | | ƒ \ } } } | d t j k rg Pn  t j | | | | ƒ } y | j } Wq t k
 r¯ t	 d | j
 ‚ q Xq W| d t j k rFt |  ƒ } y | j } Wn t k
 ró qFXd } t j j | ƒ \ } }	 |	 d k r'd }	 n  | |	 } | d t j f } n  | | | f S(   sC   Version of imp.find_module() that handles hierarchical module namest   .i   s   No source for module s   .pycs   .pyN(   t   Nonet   splitt   closet   impt   find_modulet	   PY_SOURCEt   load_modulet   __path__t   AttributeErrort   ImportErrort   __name__t
   __import__t   __file__t   ost   patht   splitext(
   t   fullnameR'   t   filet   tgtt   filenamet   descrt   modulet   mt   baset   ext(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   _find_module'   s2    	
t
   HelpDialogc           B   s;   e  Z d  „  Z d d „ Z d „  Z d „  Z d d „ Z RS(   c         C   s   d  |  _ d  |  _ d  S(   N(   R   t   parentt   dlg(   t   self(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   __init__J   s    	c         C   s[   d d l  } | j d t d d ƒ|  j d k rA |  j | ƒ n  | rW |  j | ƒ n  d S(   sä    Display the help dialog.

            parent - parent widget for the help window

            near - a Toplevel widget (e.g. EditorWindow or PyShell)
                   to use as a reference for placing the help window
        iÿÿÿÿNs‡   EditorWindow.HelpDialog is no longer used by Idle.
It will be removed in 3.6 or later.
It has been replaced by private help.HelpWindow
t
   stackleveli   (   t   warningst   warnt   DeprecationWarningR5   R   t   show_dialogt
   nearwindow(   R6   R4   t   neart   w(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   displayN   s    	c         C   sr   | |  _  t j j t j j t j j t ƒ ƒ d ƒ } t j | d | d t	 ƒ|  _
 } | j d |  j d ƒ d  S(   Ns   help.txtt   Helpt   modals	   <Destroy>t   +(   R4   R&   R'   t   joint   abspatht   dirnameR%   R	   t	   view_filet   FalseR5   t   bindt   destroy(   R6   R4   t   fnR5   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR<   `   s    	-"c         C   s\   |  j  } | j ƒ  d | j ƒ  d f } | j ƒ  | j d | ƒ | j ƒ  | j ƒ  d  S(   Ni
   s   =+%d+%d(   R5   t   winfo_rootxt   winfo_rootyt   withdrawt   geometryt	   deiconifyt   lift(   R6   R>   R5   t   geom(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR=   f   s    	 

c         C   s   d  |  _ d  |  _ d  S(   N(   R   R5   R4   (   R6   t   ev(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRJ   q   s    	N(   R#   t
   __module__R7   R   R@   R<   R=   RJ   (    (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR3   H   s
   			t   EditorWindowc           B   sk  e  Z d  d l m Z d  d l m Z d  d l m Z d  d l m	 Z	 m
 Z
 m Z d  d l m Z d  d l m Z d  d l m Z d{ Z d{ d{ d{ d{ d „ Z d	 „  Z d
 „  Z d „  Z d „  Z d{ d „ Z d| d} d~ d d€ d� d‚ g Z d „  Z d „  Z d{ Z d „  Z dƒ g Z d! „  Z  d" „  Z! d# „  Z" d$ „  Z# d{ d% „ Z$ d{ d& „ Z% d{ d' „ Z& d{ d( „ Z' d) „  Z( d* „  Z) d+ „  Z* d{ d, „ Z+ d{ d- „ Z, d. „  Z- d/ „  Z. d0 „  Z/ d1 „  Z0 d2 „  Z1 d3 „  Z2 d4 „  Z3 d5 „  Z4 d6 „  Z5 d{ d7 „ Z6 d{ d8 „ Z7 d{ d9 „ Z8 d: „  Z9 d; „  Z: d< „  Z; d= „  Z< d> „  Z= d? „  Z> d@ „  Z? dA „  Z@ dB „  ZA dC „  ZB dD „  ZC dE „  ZD dF „  ZE dG „  ZF d{ dH „ ZG dI „  ZH dJ „  ZI dK „  ZJ dL „  ZK dM „  ZL dN „  ZM dO „  ZN dP „  ZO dQ dR „ ZP dS „  ZQ dQ dT „ ZR dU „  ZS dV „  ZT dW „  ZU dX „  ZV dY „  ZW dZ „  ZX d[ „  ZY d\ „  ZZ d] „  Z[ d^ „  Z\ d{ d_ „ Z] d{ d{ d` „ Z^ da „  Z_ d{ db „ Z` d{ dc „ Za dd „  Zb de „  Zc df „  Zd dg „  Ze ef dh „ Zg di „  Zh dj „  Zi dk „  Zj dl „  Zk dm „  Zl dn „  Zm do „  Zn dp „  Zo dq „  Zp dr „  Zq ds „  Zr dt „  Zs du „  Zt dv „  Zu dw „  Zv dx „  Zw dy „  Zx dz „  Zy RS(„   iÿÿÿÿ(   t
   Percolator(   t   ColorDelegator(   t   UndoDelegator(   t	   IOBindingt   filesystemencodingt   encoding(   t   Bindings(   t   Toplevel(   t   MultiStatusBarc         C   sª	  t  j d  k rvt j j t j d d ƒ } t j j	 d ƒ r� d d t j
 d  } t j j d ƒ rl d } qd	 } t j j | | d d ƒ } n} t j d  d
 k rã t j j t j d d t ƒ  ƒ } t j j | ƒ r| } qn* t j d k rt j j t j d ƒ } n  t j j | ƒ } t j j | ƒ r_| t  _ t j d k rsd t  j t  _ qsqvd t j
 d  t  _ n  | |  _ | p‹| j } | |  _ y t j Wn t k
 r¾d t _ n Xt | ƒ |  _ t j | d |  j ƒ|  _ }	 | r| j |  _ | j |  j _ n i  |  _ i  |  j _ t j j t j ƒ  d ƒ |  _ t |	 ƒ |  _  }
 t! |
 d d ƒ|  _" } t j# d d d d d ƒ|  _$ i d d 6d d 6d d 6d  d! 6|  j$ d 6t j# d d d" d d ƒd" 6} t% d# k rïd$ | d% <n  t& t' ƒ |
 | � |  _( } |  j( |  j _) |  j* ƒ  |  j+ ƒ  |  j j, d& |  j- ƒ |  j j. d' |  j/ ƒ t0 j1 ƒ  r¢| j. d' |  j/ ƒ | j. d( |  j2 ƒ | j. d) |  j2 ƒ n | j. d* |  j2 ƒ | j. d+ |  j3 ƒ | j. d, |  j4 ƒ | j. d- |  j5 ƒ | j. d. |  j6 ƒ | j. d/ |  j7 ƒ | j. d0 |  j8 ƒ | j. d1 |  j9 ƒ | j. d2 |  j: ƒ | j. d3 |  j; ƒ | j. d4 d5 „  ƒ | j. d6 |  j< ƒ | j. d7 |  j= ƒ | j. d8 |  j> ƒ | j. d9 |  j? ƒ | j. d: |  j@ ƒ | j. d; |  jA ƒ | j. d< |  jB ƒ | j. d= |  jC ƒ | j. d> |  jD ƒ | j. d? |  jE ƒ | j. d@ |  jF ƒ | j. dA |  jG ƒ | j. dB |  jH ƒ | j. dC |  jI ƒ | j. dD |  jJ ƒ | j. dE |  jK ƒ | j. dF |  jL ƒ | j. dG |  jM ƒ | j. dH |  jN ƒ | j. dI |  jO d  ƒ ƒ | j. dJ |  jO dK ƒ ƒ | j. dL |  jP ƒ | j. dM |  jQ ƒ | j. dN |  jR ƒ | rÂ| | j |  <| rp|  | jS | <n  | j. dO |  jT ƒ | j. dP |  j jU ƒ | j. dQ |  jV ƒ | j. dR |  jW ƒ n  |  jX ƒ  | jY | dS <| jZ dT t[ dU t\ ƒ | j] | dV <t j^ |  j d d ƒ | dW <|
 jZ dT t_ dU t` dX dK ƒ | jZ dT ta dU t` dX dK ƒ | jb ƒ  t j# d dY dZ d d[ ƒ} | |  _c d\ |  _d |  jd |  _e |  jf ƒ  tg |  _h dh |  _i |  jj | ƒ |  _k } |  jl ƒ  |  _m } | jn | ƒ | jo | _o | jp | _p | jq |  jr ƒ |  js |  ƒ |  _t } | ju |  jv ƒ t |  j d` d  ƒ|  _w |  jx da jy d db dc dd d  d |  jw ƒ|  jz ƒ  d  |  _{ | rÓt j j| | ƒ rÃt j j | ƒ rÃ| j} | ƒ qÓ| j~ | ƒ n  |  j ƒ  |  jr ƒ  |  j€ |  j� | ƒ ƒ |  j‚ ƒ  |  jx jƒ de ƒ } | r‚	| j„ df ƒ } | d  k rC	dg } n  | d  k rf	| j… ƒ  | dK } n  | |  _† t j‡ |  jˆ ƒ n  t‰ jŠ |  _Š t‹ jŒ |  _Œ t‰ j� |  _� d  S(i   Nt   Docs
   index.htmlt   linuxs   python-docs-s   %s.%s.%si   s   /var/www/html/python/s   /var/www/html/python/index.htmls   /usr/share/doc/t   wins   Python%s.chmt   darwins0   Resources/English.lproj/Documentation/index.htmls   file://s   https://docs.python.org/%d.%d/i   s   >>> t   menus   recent-files.lstt   namet   vbart   mainRU   t   widtht   typet   intt   texti   t   padxt   nonet   wrapi    t   highlightthicknesst   heightg      !@t   wordprocessort   tabstylet   WM_DELETE_WINDOWs   <<close-window>>s   <Control-Button-1>s   <2>s   <3>s   <<cut>>s   <<copy>>s	   <<paste>>s   <<center-insert>>s   <<help>>s   <<python-docs>>s   <<about-idle>>s   <<open-config-dialog>>s   <<open-module>>s   <<do-nothing>>c         S   s   d S(   Nt   break(    (   t   event(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   <lambda>ß   t    s   <<select-all>>s   <<remove-selection>>s   <<find>>s   <<find-again>>s   <<find-in-files>>s   <<find-selection>>s   <<replace>>s   <<goto-line>>s   <<smart-backspace>>s   <<newline-and-indent>>s   <<smart-indent>>s   <<indent-region>>s   <<dedent-region>>s   <<comment-region>>s   <<uncomment-region>>s   <<tabify-region>>s   <<untabify-region>>s   <<toggle-tabs>>s   <<change-indentwidth>>s   <Left>s   <Right>i   s   <<del-word-left>>s   <<del-word-right>>s   <<beginning-of-line>>s   <<open-new-window>>s   <<close-all-windows>>s   <<open-class-browser>>s   <<open-path-browser>>t   commandt   sidet   fillt   yscrollcommandt   fontt   expandt   Indents
   use-spacest   booli   i2   iô  i@KL t   tearoffR*   t   labels   Recent Filest	   underlinet   windowst   endiÿÿÿÿ(   i2   iô  i@KL (Ž   RU   t   help_urlR   R&   R'   RD   R   t   prefixt   platformt   countR   t   isdirR   t   isfilet   normpatht   flistt   roott   ps1R!   t   Menut   menubarR   t   ListedToplevelt   topt   varst   tkinter_varst   inversedictt   instance_dictR   t   GetUserCfgDirt   recent_files_patht   Framet
   text_framet	   ScrollbarRe   t	   GetOptionRg   t	   TkVersionR   t   TextRj   t   focused_widgett   createmenubart   apply_bindingst   protocolR   RI   t   close_eventR   t   isAquaTkt   right_menu_eventt   cutt   copyt   pastet   center_insert_eventt   help_dialogt   python_docst   about_dialogt   config_dialogt   open_modulet
   select_allt   remove_selectiont
   find_eventt   find_again_eventt   find_in_files_eventt   find_selection_eventt   replace_eventt   goto_line_eventt   smart_backspace_eventt   newline_and_indent_eventt   smart_indent_eventt   indent_region_eventt   dedent_region_eventt   comment_region_eventt   uncomment_region_eventt   tabify_region_eventt   untabify_region_eventt   toggle_tabs_eventt   change_indentwidth_eventt   move_at_edge_if_selectiont   del_word_leftt   del_word_rightt   home_callbackt   dictt   new_callbackt   close_all_callbackt   open_class_browsert   open_path_browsert   set_status_bart   yviewt   packt   RIGHTt   Yt   sett   GetFontt   LEFTt   BOTHt   TOPt	   focus_sett   usetabst   tabwidtht   indentwidtht   set_notabs_indentwidthRH   t   context_use_ps1t   num_context_linesRV   t   perRX   t   undot   insertfiltert   undo_block_startt   undo_block_stopt   set_saved_change_hookt   saved_change_hookRY   t   iot   set_filename_change_hookt   filename_change_hookt   recent_files_menut   menudictt   insert_cascadet   update_recent_files_listt   colort   existst   loadfilet   set_filenamet   ResetColorizert   set_indentation_paramst   ispythonsourcet   load_extensionst   gett   indext   add_separatort	   wmenu_endt   register_callbackt   postwindowsmenut   tkMessageBoxt   askyesnot   tkSimpleDialogt
   askintegert	   showerror(   R6   R‹   R,   t   keyRŒ   t   dochomet   pyvert   basepatht   chmfileR‘   R™   Re   t   text_optionsRj   t	   usespacesRÛ   RÜ   Râ   Rc   Rƒ   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR7   ƒ   s4   					





	
		

	%


	
	c         C   sx   t  | t ƒ s | r | Sy | j |  j ƒ SWnC t k
 rs y | j |  j ƒ SWqt t k
 ro | j d ƒ SXn Xd S(   s8   convert filename to unicode in order to display it in Tks	   iso8859-1N(   t
   isinstancet   unicodet   decodeRZ   t   UnicodeDecodeErrorR[   (   R6   R,   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   _filename_to_unicode_  s    c         C   s)   |  j  j ƒ  \ } } |  j j | ƒ d S(   NRs   (   Râ   t   defaultfilenameR‹   t   new(   R6   Rt   RF   t   basename(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRÆ   n  s    c         C   s|  | j  d @d k r& | j d k r& d  S|  j j d ƒ r� |  j j d d d ƒ r� |  j j d d d ƒ r� t |  j j d ƒ j d ƒ d	 ƒ } nR |  j j d d ƒ } x: t t	 | ƒ ƒ D] } | | d k r¸ Pq¸ q¸ Wt	 | ƒ } t |  j j d ƒ j d ƒ d	 ƒ } | | k rd } n  d t
 | ƒ d } | j  d	 @d k r\|  j j d d d ƒ nù |  j j d ƒ s„|  j j d d ƒ nY |  j j |  j j d ƒ d |  j j d ƒ ƒ rÊ|  j j d d ƒ n |  j j d d ƒ |  j j | ƒ } |  j j d ƒ } |  j j | d | ƒ r)| | } } n  |  j j d d d ƒ |  j j d | | ƒ |  j j d | ƒ |  j j d ƒ d S(   Ni   i    t   Homet   iomarks   <=s   insert lineends   insert linestartR   i   t    s   	t   inserts   insert linestart+t   ct   sels   1.0Rƒ   s	   sel.firstt	   my_anchort   <s   sel.lastt   >Rs   (   R  s   	(   t   statet   keysymRj   Rò   t   compareRi   R   Rñ   t   xranget   lent   strt
   tag_removet   mark_sett   tag_addt   see(   R6   Rt   t   insertptt   linet   lineatt   destt   firstt   last(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRÄ   s  s>    "(%	0c         C   s  |  j  |  j ƒ |  _ t |  j d d d d d d ƒ} t j d k ra |  j j d d d	 t ƒn  |  j j d
 d d	 t ƒ|  j j d d d	 t ƒ|  j j d	 t	 d t
 ƒ | j d	 t	 d t
 ƒ |  j j d |  j ƒ |  j j d d d ƒ |  j j |  j ƒ d  S(   NRo   i   t   borderwidtht
   backgroundt   grey75Rb   t	   _padding1s       Rx   t   columns   Col: ?R  s   Ln: ?Ry   s   <<set-line-and-column>>s   <KeyRelease>s   <ButtonRelease>(   R^   R‘   t
   status_barR˜   R   R†   t	   set_labelRÍ   RÌ   t   BOTTOMt   XRj   RI   t   set_line_and_columnt	   event_addt
   after_idle(   R6   t   sep(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRÊ   œ  s    !
c         C   sS   |  j  j t ƒ j d ƒ \ } } |  j j d d | ƒ |  j j d d | ƒ d  S(   NR   R(  s   Col: %sR  s   Ln: %s(   Rj   Rò   t   INSERTR   R)  R*  (   R6   Rt   R  R(  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR-  ¬  s    !R*   t   _Filet   editt   _Editt   formatt   F_ormatt   runt   _Runt   optionst   _OptionsR‚   t   _WindowR   t   _Helpc         C   sô   |  j  } i  |  _ } xe |  j D]Z \ } } t | ƒ \ } } t | d | d d ƒ| | <} | j d | d | d | ƒ q  Wt j ƒ  rÃ t | d d d d ƒ| d <} | j d d	 d | ƒ n  |  j ƒ  |  j d
 j	 t
 ƒ |  _ |  j ƒ  d  S(   NRd   R   i    R€   Rc   R�   t   applet   applicationt   IDLER   (   R�   Ræ   t
   menu_specst   prepstrRŽ   t   add_cascadeR   t
   isCarbonTkt
   fill_menusRò   t   ENDt   base_helpmenu_lengtht   reset_help_menu_entries(   R6   t   mbarRæ   Rd   R€   R�   Rc   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRŸ   ¼  s    	  
c         C   sk   |  j  d } | j d ƒ } | d  k r1 d } n  | |  j k rZ | j |  j d | ƒ n  t j | ƒ d  S(   NR‚   Rƒ   iÿÿÿÿi   (   Ræ   Rò   R   Rô   t   deleteR   t   add_windows_to_menu(   R6   Rc   Rƒ   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRö   Î  s    	c   	      C   s%  |  j  j d d | j | j f ƒ |  j s9 |  j ƒ  n  |  j } | |  _ t j d  d k } | rz |  j  j	 d d ƒ n  xr |  j
 D]g } y | \ } } } Wn t k
 r³ q„ n X| d  k rÆ q„ n  t |  | ƒ ƒ  } | j | d | ƒq„ W| j | j | j ƒ | r!|  j  j	 d d ƒ n  d  S(	   NR  s   @%d,%di   Ra   t   cursort   arrowR  t   ibeam(   Rj   R  t   xt   yt   rmenut
   make_rmenuRt   R   R†   t   configt   rmenu_specst
   ValueErrorR   t   getattrt   entryconfiguret   tk_popupt   x_roott   y_root(	   R6   Rt   RP  t   iswint   itemR€   t	   eventnamet   verify_stateR  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR¤   Ú  s(    #			t   Closes   <<close-window>>c         C   sŒ   t  |  j d d ƒ} xg |  j D]\ } | d | d } } | d  k	 rq |  j | d „ } | j d | d | ƒ q | j ƒ  q W| |  _ d  S(   NR   i    i   c         S   s   |  j  | ƒ d  S(   N(   t   event_generate(   Rj   R\  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRw   ý  s    R€   Rw   (   RŽ   Rj   RS  R   t   add_commandRó   RP  (   R6   RP  R[  R€   R\  Rw   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRQ  ø  s    c         C   s
   |  j  ƒ  S(   N(   t   rmenu_check_copy(   R6   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   rmenu_check_cut  s    c         C   s=   y |  j  j d ƒ } Wn t k
 r* d SX| r5 d Sd Sd  S(   Ns	   sel.firstt   disabledt   normal(   Rj   Rò   t   TclError(   R6   t   indx(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRa    s
    c         C   s=   y  |  j  j j d |  j  d ƒ Wn t k
 r4 d SXd Sd  S(   Ns   tk::GetSelectiont	   CLIPBOARDRc  Rd  (   Rj   t   tkt   callRe  (   R6   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   rmenu_check_paste  s
     c         C   s   t  j |  j d ƒ d S(   s   Handle Help 'About IDLE' event.s
   About IDLEN(   R   t   AboutDialogR‘   (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR«     s    c         C   s   t  j |  j d ƒ d S(   s&   Handle Options 'Configure IDLE' event.t   SettingsN(   R
   t   ConfigDialogR‘   (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR¬     s    c         C   s/   |  j  r |  j  } n	 |  j } t j | ƒ d S(   s   Handle Help 'IDLE Help' event.N(   RŒ   R‘   R   t   show_idlehelp(   R6   Rt   R4   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR©   !  s    		c         C   sy   t  j d  d k re y t j |  j ƒ Wqu t k
 ra } t j d d d t | ƒ d |  j	 ƒ qu Xn t
 j |  j ƒ d S(   Ni   Ra   t   titles   Document Start Failuret   messageR4   Rs   (   R   R†   R&   t	   startfileR„   t   WindowsErrorR÷   Rû   R  Rj   t
   webbrowsert   open(   R6   Rt   t   why(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRª   *  s    c         C   s   |  j  j d ƒ d S(   Ns   <<Cut>>Rs   (   Rj   R_  (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR¥   5  s    c         C   s*   |  j  j d ƒ s d  S|  j  j d ƒ d S(   NR  s   <<Copy>>Rs   (   Rj   t
   tag_rangesR_  (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR¦   9  s    c         C   s$   |  j  j d ƒ |  j  j d ƒ d S(   Ns	   <<Paste>>R  Rs   (   Rj   R_  R  (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR§   @  s    c         C   s=   |  j  j d d d ƒ |  j  j d d ƒ |  j  j d ƒ d S(   NR  s   1.0s   end-1cR  Rs   (   Rj   R  R  R  (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR®   E  s    c         C   s*   |  j  j d d d ƒ |  j  j d ƒ d  S(   NR  s   1.0Rƒ   R  (   Rj   R  R  (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR¯   K  s    c            s:   |  j  j ‰ |  j  j ‰ d ‰ ‡  ‡ ‡ ‡ f d †  } | S(   sè   Cursor move begins at start or end of selection

        When a left/right cursor key is pressed create and return to Tkinter a
        function which causes a cursor move from the associated edge of the
        selection.

        s   sel.first+1cs   sel.last-1cc            sM   |  j  d @d k rI y ˆ d ƒ ˆ d ˆ ˆ  ƒ WqI t k
 rE qI Xn  d  S(   Ni   i    s	   sel.firstR  (   R  Re  (   Rt   (   t
   edge_indext   edges_tablet   self_text_indext   self_text_mark_set(    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   move_at_edgeZ  s    
(   s   sel.first+1cs   sel.last-1c(   Rj   Rò   R  (   R6   Rw  R{  (    (   Rw  Rx  Ry  Rz  s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRÁ   O  s
    c         C   s   |  j  j d ƒ d S(   Ns   <Meta-Delete>Rs   (   Rj   R_  (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRÂ   c  s    c         C   s   |  j  j d ƒ d S(   Ns   <Meta-d>Rs   (   Rj   R_  (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRÃ   g  s    c         C   s   t  j |  j ƒ d S(   NRs   (   R   t   findRj   (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR°   k  s    c         C   s   t  j |  j ƒ d S(   NRs   (   R   t
   find_againRj   (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR±   o  s    c         C   s   t  j |  j ƒ d S(   NRs   (   R   t   find_selectionRj   (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR³   s  s    c         C   s    t  j |  j |  j |  j ƒ d S(   NRs   (   R   t   grepRj   Râ   R‹   (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR²   w  s    c         C   s   t  j |  j ƒ d S(   NRs   (   R   t   replaceRj   (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR´   {  s    c         C   sp   |  j  } t j d d d | ƒ} | d  k r1 d S| d k rK | j ƒ  d S| j d d | ƒ | j d ƒ d  S(   Nt   Gotos   Go to line number:R4   Rs   i    R  s   %d.0(   Rj   Rù   Rú   R   t   bellR  R  (   R6   Rt   Rj   t   lineno(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRµ     s    		
c   	      C   sP  y |  j  j d d ƒ } Wn t k
 r2 d } n X| j ƒ  } t j d d d |  j  d | ƒ} | ru | j ƒ  } n  | s d  Sy" t | ƒ \ } } \ } } } Wn9 t t f k
 rÜ } t	 j
 d t | ƒ d |  j  ƒd  SX| t j k rt	 j
 d	 d
 | d |  j  ƒd  S| r | j ƒ  n  |  j r<|  j j | ƒ n |  j j | ƒ | S(   Ns	   sel.firsts   sel.lastRv   t   ModulesA   Enter the name of a Python module
to search on sys.path and open:R4   t   initialvalues   Import errors   Unsupported types   %s is not a source module(   Rj   Rñ   Re  t   stripRù   t	   askstringR2   t	   NameErrorR"   R÷   Rû   R  R   R   R   R‹   Rt  Râ   Rë   (	   R6   Rt   Rd   t   ft	   file_patht   suffixt   modet   mtypet   msg(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR­   ‹  s6    
	"		c         C   s    |  j  j } |  j j d k o! | sC |  j ƒ  } | d  k rC d  Sn  t j j | ƒ \ } } t j j	 | ƒ \ } } d d l
 m } | j |  j | | g ƒ d  S(   Nt   PyShellEditorWindowiÿÿÿÿ(   t   ClassBrowser(   Râ   R,   t	   __class__R#   R­   R   R&   R'   R   R(   t   idlelibR�  R‹   (   R6   Rt   R,   t   headt   tailR0   R1   R�  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRÈ   ­  s    c         C   s$   d d l  m } | j |  j ƒ d  S(   Niÿÿÿÿ(   t   PathBrowser(   R’  R•  R‹   (   R6   Rt   R•  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRÉ   ¹  s    c         C   sl   | d  k	 rh | d k rh |  j j d d | ƒ |  j j d d d ƒ |  j j d d d ƒ |  j ƒ  n  d  S(   Ni    R  s   %d.0R  s   1.0Rƒ   s
   insert +1l(   R   Rj   R  R  R  t   center(   R6   Rƒ  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   gotoline½  s
    c         C   sº   | s t  j j | ƒ r t St  j j t  j j | ƒ ƒ \ } } t  j j | ƒ d k r] t Sy& t | ƒ } | j ƒ  } | j	 ƒ  Wn t
 k
 r— t SX| j d ƒ o¹ | j d ƒ d k S(   Ns   .pys   .pyws   #!t   pythoni    (   s   .pys   .pyw(   R&   R'   Rˆ   t   TrueR(   R
  t   normcaseRt  t   readlineR   t   IOErrorRH   t
   startswithR|  (   R6   R,   R0   R1   R‰  R  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRï   Ä  s    $c         C   s)   |  j  r% |  j  j |  ƒ d  |  _  n  d  S(   N(   R‹   t   unregister_maybe_terminateR   (   R6   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt
   close_hookÒ  s    	c         C   s   | |  _  d  S(   N(   RŸ  (   R6   RŸ  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   set_close_hook×  s    c         C   sD   |  j  r |  j  j |  ƒ n  |  j ƒ  |  j j |  ƒ |  j ƒ  d  S(   N(   R‹   t   filename_changed_editRá   R‘   t   update_windowlist_registryRí   (   R6   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRä   Ú  s
    	
c         C   s}   |  j  r d  S|  j |  j j ƒ r4 |  j ƒ  |  _  n  |  j  ry |  j j |  j ƒ |  j j |  j  ƒ |  j j |  j ƒ n  d  S(   N(	   Ré   Rï   Râ   R,   RW   RÛ   t   removefilterRÜ   RÝ   (   R6   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   _addcolorizerá  s    		c         C   s:   |  j  s d  S|  j  j ƒ  |  j j |  j  ƒ d  |  _  d  S(   N(   Ré   t   removecolorsRÛ   R£  R   (   R6   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   _rmcolorizerì  s
    	c         C   sÁ   |  j  ƒ  |  j ƒ  t j ƒ  } t j | d ƒ } t j | d d d ƒ} t j | d ƒ } |  j j d | d d | d d | d	 | d d
 | d ƒ t d k r½ |  j j d | d ƒ n  d S(   s   Update the color themeRd  RK  t   fgBgt   fgt   hilitet
   foregroundR%  t   insertbackgroundt   selectforegroundt   selectbackgroundg      !@t   inactiveselectbackgroundN(   R¦  R¤  R   t   CurrentThemet   GetHighlightRj   RR  Rœ   (   R6   t   themet   normal_colorst   cursor_colort   select_colors(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRí   ó  s    




c         C   s#   t  j |  j d d ƒ |  j d <d S(   s.   Update the text widgets' font if it is changedRf   RU   R{   N(   R   RÐ   RŒ   Rj   (   R6   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt	   ResetFont  s    c         C   s©   t  j ƒ  |  j _ } x- | j ƒ  D] \ } } |  j j | | Œ q# Wx\ |  j ƒ  D]N } t  j | ƒ } | rS x0 | j ƒ  D] \ } } |  j j | | Œ q{ WqS qS Wd S(   s/   Remove the keybindings before they are changed.N(	   R   t   GetCurrentKeySetR\   t   default_keydefst   itemsRj   t   event_deletet   get_standard_extension_namest   GetExtensionBindings(   R6   t   keydefsRt   t   keylistt   extensionNamet   xkeydefs(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   RemoveKeybindings  s    c         C   sß  t  j ƒ  |  j _ } |  j ƒ  x9 |  j ƒ  D]+ } t  j | ƒ } | r- |  j | ƒ q- q- Wi  } xd |  j j D]V } i  | | d <x? | d D]3 } | rŽ | d | | d t | d ƒ d <qŽ qŽ Wqo Wx|  j	 j
 ƒ  D]þ } |  j	 | } | j t ƒ } | d k rqÙ n  | d 7} x½ t d | ƒ D]¬ }	 | j |	 ƒ d k r'| j |	 d ƒ }
 |
 rÓ| j |	 d ƒ } d } | | k r¢| | | k r¢| | | } q¢n  | rÐt | | ƒ }
 | j |	 d |
 ƒqÐqÓq'q'WqÙ Wd S(   s-   Update the keybindings after they are changedi    i   Rw   t   acceleratorR€   Rv   N(   R   R¶  R\   R·  R    Rº  R»  t   menudefsRA  Ræ   t   keysRò   RE  R   t   rangeRh   t	   entrycgett   get_acceleratort   entryconfig(   R6   R¼  R¾  R¿  t   menuEventDictRc   R[  t   menubarItemRƒ   Rò   t   accelt   itemNameRt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   ApplyKeybindings  s<    
/
c         C   s.   |  j  s* t j d d d d d ƒ|  _ n  d S(   sC   Update the indentwidth if changed and not using tabs in this windowRf   R}   s
   num-spacesRh   Ri   N(   RÕ   R   R›   R×   (   R6   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRØ   =  s    	c         C   s³   t  j ƒ  } |  j d } | j t ƒ } | |  j k rQ | j |  j d | ƒ n  | r¢ | j ƒ  x> | D]3 } |  j | d ƒ } | j	 d | d d | ƒ qh Wn  | |  j d <d S(   s3   Update the additional help entries on the Help menuR   i   R€   i    Rw   N(
   R   t   GetAllExtraHelpSourcesListRæ   Rò   RE  RF  RI  Ró   t"   _EditorWindow__extra_help_callbackR`  (   R6   t	   help_listt   helpmenut   helpmenu_lengtht   entryt   cmd(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRG  D  s    
!c            s   | ‡  f d † } | S(   sC   Create a callback with the helpfile value frozen at definition timec            s—   |  j  d	 ƒ s$ t j j |  ƒ }  n  t j d  d k r† y t j |  ƒ Wq“ t k
 r‚ } t j	 d d d t
 | ƒ d ˆ  j ƒ q“ Xn t j |  ƒ d  S(
   Nt   wwwt   httpi   Ra   Ro  s   Document Start FailureRp  R4   (   RÔ  RÕ  (   R�  R&   R'   RŠ   R   R†   Rq  Rr  R÷   Rû   R  Rj   Rs  Rt  (   t   helpfileRu  (   R6   (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   display_extra_helpW  s    (    (   R6   RÖ  R×  (    (   R6   s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   __extra_help_callbackU  s    c         C   sS  g  } t  j j |  j ƒ rE t |  j d ƒ � } | j ƒ  } Wd QXn  | r� t  j j | ƒ d } | | k r} | j | ƒ n  | j d | ƒ n  g  } xD | D]< } d | k sÉ t  j j | d d !ƒ r� | j	 | ƒ q� q� Wg  | D] } | | k rä | ^ qä } d } | d t
 | ƒ !} y, t |  j d ƒ � } | j | ƒ Wd QXWn` t k
 r©} t |  j d	 t ƒ sªt |  j _ t j d
 d d d t | ƒ d |  j ƒ qªn Xx¢ |  j j j ƒ  D]Ž }	 |	 j }
 |
 j d t ƒ xl t | ƒ D]^ \ } } | j ƒ  } |  j | ƒ } |	 j | ƒ } |
 j  d | | d | d | d d ƒ qéWq½Wd S(   s/   Load and update the recent files list and menust   rNs   
i    s    iÿÿÿÿt   1234567890ABCDEFGHIJKR?   t   recentfilelist_error_displayedRo  s   IDLE WarningRp  s|   Cannot update File menu Recent Files list. Your operating system says:
%s
Select OK and IDLE will continue without updating.R4   R€   R  Rw   R�   (!   R&   R'   Rê   R—   Rt  t	   readlinesRE   t   removeR  t   appendR  t
   writelinesRœ  RU  RŒ   RH   R™  RÛ  R÷   t   showwarningR  Rj   R‘   R•   RÃ  Rå   RI  RE  t	   enumeratet   rstripR  t#   _EditorWindow__recent_file_callbackR`  (   R6   t   new_filet   rf_listt   rf_list_filet	   bad_pathsR'   t   ulcharst   rf_filet   errt   instanceRc   t   it	   file_namet
   ufile_namet   callback(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRè   d  sH    &%	c            s   | ‡  f d † } | S(   Nc            s   ˆ  j  j d |  ƒ d  S(   Nt   editFile(   Râ   Rt  (   t
   fn_closure(   R6   (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   open_recent_file‘  s    (    (   R6   Rí  Rò  (    (   R6   s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   __recent_file_callback�  s    c         C   s¶   |  j  ƒ  } |  j ƒ  } | r9 | r9 | d | t } n$ | rH | } n | rW | } n d } | pl | pl | } |  j ƒ  s’ d | } d | } n  |  j j | ƒ |  j j | ƒ d  S(   Ns    - t   Untitleds   *%s*s   *%s(   t   short_titlet
   long_titlet   _py_versiont	   get_savedR‘   t   wm_titlet   wm_iconname(   R6   t   shortt   longRo  t   icon(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRá   •  s    		
c         C   s   |  j  j ƒ  S(   N(   RÜ   Rø  (   R6   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRø  §  s    c         C   s   |  j  j | ƒ d  S(   N(   RÜ   t	   set_saved(   R6   t   flag(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRþ  ª  s    c         C   s   |  j  j ƒ  d  S(   N(   RÜ   t
   reset_undo(   R6   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR   ­  s    c         C   s:   |  j  j } | r' t j j | ƒ } n d } |  j | ƒ S(   NRô  (   Râ   R,   R&   R'   R
  R  (   R6   R,   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRõ  °  s
    c         C   s   |  j  |  j j p d ƒ S(   NRv   (   R  Râ   R,   (   R6   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRö  ¹  s    c         C   s   |  j  ƒ  d  S(   N(   R–  (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR¨   ½  s    R  c         C   sb   |  j  } |  j ƒ  \ } } |  j | ƒ } | | } t d | | d ƒ } | j t | ƒ ƒ d  S(   Ni   i   (   Rj   t   getwindowlinest	   getlinenot   maxRË   t   float(   R6   t   markRj   R‘   t   botRƒ  Ro   t   newtop(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR–  À  s    	
c         C   sp   |  j  } |  j d ƒ } |  j d ƒ } | | k rf | j ƒ  d k rf t | d ƒ } | | d } n  | | f S(   Ns   @0,0s   @0,65535i   Ro   (   Rj   R  t   winfo_heightRi   (   R6   Rj   R‘   R  Ro   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR  È  s    	c         C   s"   |  j  } t t | j | ƒ ƒ ƒ S(   N(   Rj   Ri   R  Rò   (   R6   R  Rj   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR  Ò  s    	c         C   s:   |  j  j ƒ  } t j d | ƒ } t t | j ƒ  ƒ } | S(   s   Return (width, height, x, y)s   (\d+)x(\d+)\+(-?\d+)\+(-?\d+)(   R‘   t   wm_geometryt   ret   matcht   mapRi   t   groups(   R6   RR   R/   t   tuple(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   get_geometryÖ  s    c         C   s   |  j  ƒ  d  S(   N(   R   (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR¢   Ý  s    c         C   sh   |  j  rd |  j ƒ  sW |  j j ƒ  d k r: |  j j ƒ  n  |  j j ƒ  |  j j ƒ  n  |  j  j ƒ  Sd  S(   NRd  (   Râ   Rø  R‘   R  RP   t   lowerRQ   t	   maybesave(   R6   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR  à  s    	c         C   s/   |  j  ƒ  } t | ƒ d k r+ |  j ƒ  n  | S(   Nt   cancel(   R  R  t   _close(   R6   t   reply(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR   é  s    c         C   sÒ   |  j  j r% |  j d |  j  j ƒ n  t j |  j ƒ |  j ƒ  |  j  j ƒ  d  |  _  d  |  _	 |  j
 rƒ |  j
 j t ƒ d  |  _
 n  d  |  _ d  |  _ |  j j ƒ  d  |  _ |  j j ƒ  |  j rÎ |  j ƒ  n  d  S(   NRä  (   Râ   R,   Rè   R   t   unregister_callbackRö   t   unload_extensionsR   R   RÜ   Ré   RH   Rj   R“   RÛ   R‘   RJ   RŸ  (   R6   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR  ï  s"    
							c         C   s   i  |  _  |  j ƒ  d  S(   N(   t
   extensionst   load_standard_extensions(   R6   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRð     s    	c         C   sC   x3 |  j  j ƒ  D]" } t | d ƒ r | j ƒ  q q Wi  |  _  d  S(   NR   (   R  t   valuest   hasattrR   (   R6   t   ins(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR    s    c         C   s[   xT |  j  ƒ  D]F } y |  j | ƒ Wq d Gt | ƒ GHd d  l } | j ƒ  q Xq Wd  S(   Ns   Failed to load extensioniÿÿÿÿ(   Rº  t   load_extensiont   reprt	   tracebackt	   print_exc(   R6   Rd   R  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR    s    c         C   s   t  j d t ƒ S(   Nt   editor_only(   R   t   GetExtensionsR™  (   R6   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRº    s    c         C   sV  y t  | t ƒ  t ƒ  g  ƒ } Wn t k
 r< d G| GHd  SXt | | ƒ } t j | ƒ } t | d ƒ r€ |  j | j	 | ƒ n  | |  ƒ } | |  j
 | <| rR|  j | ƒ x£ | j ƒ  D]’ } | j d d ƒ } x | d  d k rñ | d } qÔ Wx | d d k r| d  } qõ W| d	 } t | | ƒ r¹ |  j j | t | | ƒ ƒ q¹ q¹ Wn  d  S(
   Ns   
Failed to import extension: RÂ  t   -t   _i   R  iÿÿÿÿR  t   _event(   R$   t   globalst   localsR"   RU  R   R»  R  RD  RÂ  R  R    RÃ  R€  Rj   RI   (   R6   Rd   t   modt   clsR¼  R  t   veventt
   methodname(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR    s,    	
c         C   sg   | d  k r |  j j } n  |  j } | | _ x3 | j ƒ  D]% \ } } | r: | j | | Œ q: q: Wd  S(   N(   R   R\   R·  Rj   R¼  R¸  R.  (   R6   R¼  Rj   Rt   R½  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR    1  s    		c         C   sf  | d	 k r |  j j } n  | d	 k r6 |  j j } n  |  j } |  j } x| D]\ } } | j | ƒ } | sv qO n  xå | D]Ý } | s– | j ƒ  q} | \ }	 }
 |	 d  d k } | rÅ |	 d }	 n  t |	 ƒ \ } }	 t	 | |
 ƒ } | |
 d „ } | r8|  j
 |
 t ƒ } | j d |	 d | d | d | d | ƒ q} | j d |	 d | d | d | ƒ q} WqO Wd	 S(
   s   Add appropriate entries to the menus and submenus

        Menus that are absent or None in self.menudict are ignored.
        i   t   !c         S   s   |  j  | ƒ d  S(   N(   R_  (   Rj   R\  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRw   S  s    R€   R�   Rw   RÁ  t   variableN(   R   R\   RÂ  R·  Ræ   Rj   Rñ   Ró   RA  RÆ  t   get_var_objt
   BooleanVart   add_checkbuttonR`  (   R6   RÂ  R¼  Ræ   Rj   t   mnamet	   entrylistRc   RÒ  R€   R\  t   checkbuttonR�   RÁ  Rw   t   var(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRD  :  s8    		
c         C   s2   |  j  | ƒ } | r% | j ƒ  } | St | ‚ d  S(   N(   R-  Rñ   Rˆ  (   R6   Rd   R3  t   value(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   getvar_  s
    c         C   s5   |  j  | | ƒ } | r( | j | ƒ n	 t | ‚ d  S(   N(   R-  RÏ   Rˆ  (   R6   Rd   R4  t   vartypeR3  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   setvarg  s    c         C   s@   |  j  j | ƒ } | r< | r< | |  j ƒ |  j  | <} n  | S(   N(   R“   Rñ   Rj   (   R6   Rd   R6  R3  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR-  n  s    c         C   s<   |  j  r4 |  j j d | ƒ p3 d |  j j | ƒ k Sd Sd  S(   Nt   TODOt   STRINGi   (   Ré   Rj   t   tag_prevranget	   tag_names(   R6   t
   text_index(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   is_char_in_string~  s    	c         C   sK   y2 |  j  j d ƒ } |  j  j d ƒ } | | f SWn t k
 rF d SXd  S(   Ns	   sel.firsts   sel.last(   NN(   Rj   Rò   Re  R   (   R6   R"  R#  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   get_selection_indicesŠ  s    c         C   s   |  j  d p t } t | ƒ S(   Nt   tabs(   Rj   t   TK_TABWIDTH_DEFAULTRi   (   R6   t   current(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   get_tabwidth•  s    c         C   s^   |  j  } |  j ƒ  | k rZ | j j d d | d d | j d | ƒ } | j d | ƒ n  d  S(   NR{   t   measures
   -displayoft   nR?  (   Rj   RB  Rh  Ri  t   mastert	   configure(   R6   t   newtabwidthRj   t   pixels(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   set_tabwidth›  s    		c         C   su   | ra | ra |  j  ƒ  } d | k o/ d k n r@ | |  _ n  |  j |  j k ra t |  _ qa n  |  j |  j ƒ d  S(   Ni   i   (   t   guess_indentR×   RÖ   RH   RÕ   RI  (   R6   Rï   t   guessRì  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRî   ©  s    c         C   sÔ  |  j  } |  j ƒ  \ } } | rK | rK | j | | ƒ | j d | ƒ d S| j d d ƒ } | d k rœ | j d d d ƒ rŽ | j d ƒ n
 | j ƒ  d S| d d	 k r½ | j d ƒ d S|  j } t | j	 | ƒ ƒ } | d
 |  j
 |  j
 } |  j rt j j d ƒ d }	 n d }	 d }
 x] | |	 k r4Pn  | d  } |
 d
 }
 t | j	 | ƒ ƒ } | | k sy| d d	 k r$Pq$q$W| j ƒ  | j d |
 d ƒ | | k  rÆ| j d d | | ƒ n  | j ƒ  d S(   NR  Rs   s   insert linestartRv   R  s   1.0s	   insert-1ciÿÿÿÿs    	i   s   
i    s
   insert-%dcR  (   Rj   R>  RI  R  Rñ   R  R‚  RÖ   R  t
   expandtabsR×   RÙ   R   R�   R   RÞ   R  Rß   (   R6   Rt   Rj   R"  R#  t   charsRÖ   t   havet   wantt   last_line_of_promptt   ncharsdeleted(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR¶   ²  sH    	
		



c   
      C   sH  |  j  } |  j ƒ  \ } } | j ƒ  z| r| | r| t | ƒ t | ƒ k rY |  j | ƒ S| j | | ƒ | j d | ƒ n  | j d d ƒ } t | |  j	 ƒ \ } } | t
 | ƒ k rÏ |  j | |  j ƒ nU |  j rá d } n3 t
 | j |  j	 ƒ ƒ } |  j }	 d |	 | |	 } | j d | ƒ | j d ƒ d SWd  | j ƒ  Xd  S(   NR  s   insert linestarts   	R  Rs   (   Rj   R>  RÞ   t
   index2lineR¹   RI  R  Rñ   t
   classifywsRÖ   R  t   reindent_toR×   RÕ   RL  R  R  Rß   (
   R6   Rt   Rj   R"  R#  R…   t   rawt	   effectivet   padRD  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR¸   â  s,    	
			c         C   sõ  |  j  } |  j ƒ  \ } } | j ƒ  z±| rW | rW | j | | ƒ | j d | ƒ n  | j d d ƒ } d t | ƒ } } x* | | k  r¨ | | d k r¨ | d } q W| | k rÉ | j d d ƒ d S| |  } d } t j	 j
 d ƒ d }	 x: | r+| d d k r+| |	 k r+| d  } | d } qò W| rI| j d	 | d ƒ n  x& | j d ƒ d k rq| j d ƒ qLW| j d d ƒ t | j d ƒ ƒ }
 t j |  j |  j ƒ } |  j s^x� |  j D]‚ } t |
 | d ƒ } t | ƒ d
 } | j | d ƒ } | j | ƒ | j |  j |  j | ƒ ƒ } | d  k	 s@| d k rÂPqÂqÂW| j | pWd ƒ nW | j d d ƒ } | rƒ| d } n d } | j | d ƒ } | j | ƒ | j d ƒ | j ƒ  } | t j k rw| t j k rân‘ | t j k r| j d | ƒ no | t j k r)|  j  | j! ƒ  ƒ nJ | t j" k rs| j# ƒ  d k r]| j d | ƒ qs|  j  | j$ ƒ  ƒ n  d S| j% ƒ  } | j d | ƒ | j& ƒ  r¯|  j' | ƒ n" | rÑ| j( ƒ  rÑ|  j) | ƒ n  d SWd  | j* d ƒ | j+ ƒ  Xd  S(   NR  s   insert linestarti    s    	i   s   
Rs   iÿÿÿÿs   insert - %d charss   .0t   consoles   1.0(,   Rj   R>  RÞ   RI  R  Rñ   R  R  R   R�   R   RR  Rò   R   t   ParserR×   RÖ   RÙ   RÚ   R  R  t   set_strt   find_good_parse_startt   _build_char_in_string_funcR   t   set_loR:  t   get_continuation_typet   C_NONEt   C_STRING_FIRST_LINEt   C_STRING_NEXT_LINESt	   C_BRACKETRT  t   compute_bracket_indentt   C_BACKSLASHt   get_num_lines_in_stmtt   compute_backslash_indentt   get_base_indent_stringt   is_block_openerR¸   t   is_block_closerR¶   R  Rß   (   R6   Rt   Rj   R"  R#  R  Rì  RD  t   indentRP  t   lnoRO  t   contextt   startatt   startatindext   rawtextt   bodRÙ  R  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR·     sˆ    	

%
	c         C   s   | |  j  d „ } | S(   Nc         S   s   | | d |  ƒ S(   Ns   +%dc(    (   t   offsett   _startindext   _icis(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   innerq  s    (   R=  (   R6   t
   startindexRt  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR\  p  s    c   
      C   s¢   |  j  ƒ  \ } } } } xm t t | ƒ ƒ D]Y } | | } | r+ t | |  j ƒ \ } }	 |	 |  j }	 |  j |	 ƒ | | | | <q+ q+ W|  j | | | | ƒ d S(   NRs   (   t
   get_regionRÄ  R  RS  RÖ   R×   t   _make_blankst
   set_region(
   R6   Rt   R“  R”  RM  t   linest   posR  RU  RV  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR¹   v  s    
"c   
      C   s«   |  j  ƒ  \ } } } } xv t t | ƒ ƒ D]b } | | } | r+ t | |  j ƒ \ } }	 t |	 |  j d ƒ }	 |  j |	 ƒ | | | | <q+ q+ W|  j | | | | ƒ d S(   Ni    Rs   (	   Rv  RÄ  R  RS  RÖ   R  R×   Rw  Rx  (
   R6   Rt   R“  R”  RM  Ry  Rz  R  RU  RV  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRº   �  s    
"c         C   sk   |  j  ƒ  \ } } } } x6 t t | ƒ d ƒ D] } | | } d | | | <q/ W|  j | | | | ƒ d  S(   Ni   s   ##(   Rv  RÄ  R  Rx  (   R6   Rt   R“  R”  RM  Ry  Rz  R  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR»   Œ  s
    
c         C   s©   |  j  ƒ  \ } } } } xt t t | ƒ ƒ D]` } | | } | sG q+ n  | d  d k rd | d } n | d  d k r� | d } n  | | | <q+ W|  j | | | | ƒ d  S(   Ni   s   ##i   t   #(   Rv  RÄ  R  Rx  (   R6   Rt   R“  R”  RM  Ry  Rz  R  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR¼   “  s    
c         C   sÆ   |  j  ƒ  \ } } } } |  j ƒ  } | d  k r4 d  Sxu t t | ƒ ƒ D]a } | | } | rG t | | ƒ \ }	 }
 t |
 | ƒ \ } } d | d | | |	 | | <qG qG W|  j | | | | ƒ d  S(   Ns   	R  (   Rv  t   _asktabwidthR   RÄ  R  RS  t   divmodRx  (   R6   Rt   R“  R”  RM  Ry  RÖ   Rz  R  RU  RV  t   ntabst   nspaces(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR½      s     
%c         C   s‚   |  j  ƒ  \ } } } } |  j ƒ  } | d  k r4 d  Sx1 t t | ƒ ƒ D] } | | j | ƒ | | <qG W|  j | | | | ƒ d  S(   N(   Rv  R|  R   RÄ  R  RL  Rx  (   R6   Rt   R“  R”  RM  Ry  RÖ   Rz  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR¾   ¬  s     c         C   sZ   |  j  d d d |  j d d |  j d d	 d
 |  j ƒrV |  j |  _ d |  _ n  d S(   Ns   Toggle tabss
   Turn tabs t   ont   offs   ?
Indent width s   will bes
   remains ats    8.s!   
 Note: a tab is always 8 columnsR4   i   Rs   (   R€  R�  (   s   will bes
   remains at(   Rø   RÕ   Rj   R×   (   R6   Rt   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR¿   ´  s    !c         C   s_   |  j  d d d |  j d |  j d d d d ƒ} | r[ | |  j k r[ |  j r[ | |  _ n  d	 S(
   Ns   Indent widths6   New indent width (2-16)
(Always use 8 when using tabs)R4   R…  t   minvaluei   t   maxvaluei   Rs   (   Rú   Rj   R×   RÕ   (   R6   Rt   R	  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRÀ   Ê  s    			c         C   sŸ   |  j  } |  j ƒ  \ } } | rP | rP | j | d ƒ } | j | d ƒ } n | j d ƒ } | j d ƒ } | j | | ƒ } | j d ƒ } | | | | f S(   Ns
    linestarts   -1c lineend +1cs   insert linestarts   insert lineend +1cs   
(   Rj   R>  Rò   Rñ   R   (   R6   Rj   R"  R#  R“  R”  RM  Ry  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRv  Ö  s    	c         C   s    |  j  } d j | ƒ } | | k r2 | j ƒ  d  S| j d d d ƒ | j d | ƒ | j ƒ  | j | | ƒ | j | | ƒ | j ƒ  | j	 d | d ƒ d  S(   Ns   
R  s   1.0Rƒ   R  (
   Rj   RD   R‚  R  R  RÞ   RI  R  Rß   R  (   R6   R“  R”  RM  Ry  Rj   t   newchars(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRx  ã  s    	


c         C   s=   |  j  r1 t | |  j ƒ \ } } d | d | Sd | Sd  S(   Ns   	R  (   RÕ   R}  RÖ   (   R6   RD  R~  R  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRw  ó  s    	c         C   sk   |  j  } | j ƒ  | j d d d ƒ r; | j d d ƒ n  | r] | j d |  j | ƒ ƒ n  | j ƒ  d  S(   Ns   insert linestarts   !=R  (   Rj   RÞ   R  RI  R  Rw  Rß   (   R6   R(  Rj   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRT  ý  s    	
c         C   s.   |  j  d d d |  j d |  j d d d d ƒS(	   Ns	   Tab widths   Columns per tab? (2-16)R4   R…  R‚  i   Rƒ  i   (   Rú   Rj   R×   (   R6   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR|    s    		c         C   sr   t  |  j |  j ƒ j ƒ  \ } } | r` | r` t | |  j ƒ \ } } t | |  j ƒ \ } } n
 d } } | | S(   Ni    (   t   IndentSearcherRj   RÖ   R7  RS  (   R6   t   openert   indentedRU  t   indentsmallt   indentlarge(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRJ    s    !
N(   R*   R2  (   R3  R4  (   R5  R6  (   R7  R8  (   R9  R:  (   R‚   R;  (   R   R<  (   R^  s   <<close-window>>N(z   R#   RT   t   idlelib.PercolatorRV   t   idlelib.ColorDelegatorRW   t   idlelib.UndoDelegatorRX   t   idlelib.IOBindingRY   RZ   R[   R’  R\   t   TkinterR]   t   idlelib.MultiStatusBarR^   R   R„   R7   R  RÆ   RÄ   RÊ   R-  R@  RŸ   Rö   RP  R¤   RS  RQ  Rb  Ra  Rj  R«   R¬   R©   Rª   R¥   R¦   R§   R®   R¯   RÁ   RÂ   RÃ   R°   R±   R³   R²   R´   Rµ   R­   RÈ   RÉ   R—  Rï   RŸ  R   Rä   R¤  R¦  Rí   Rµ  RÀ  RÌ  RØ   RG  RÎ  Rè   Rã  Rá   Rø  Rþ  R   Rõ  Rö  R¨   R–  R  R  R  R¢   R  R   R  Rð   R  R  Rº  R  R    RD  R5  R7  R-  R=  R>  RB  RI  R™  Rî   R¶   R¸   R·   R\  R¹   Rº   R»   R¼   R½   R¾   R¿   RÀ   Rv  Rx  Rw  RT  R|  RJ  (    (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRU   x   sæ   Ü			)				
																			"											$			,										
													%							0	#	k												
			c         C   s   t  t |  ƒ ƒ S(   N(   Ri   R  (   Rò   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRR    s    c         C   st   d } } x] |  D]U } | d k r: | d } | d } q | d k re | d } | | d | } q Pq W| | f S(   Ni    R  i   s   	(    (   t   sRÖ   RU  RV  t   ch(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRS  &  s    


R…  c           B   s;   e  Z d  „  Z d „  Z e j e j d
 d „ Z d	 „  Z RS(   c         C   s6   | |  _  | |  _ d |  _ |  _ d  |  _ |  _ d  S(   Ni    (   Rj   RÖ   Rì  t   finishedR   t   blkopenlinet   indentedline(   R6   Rj   RÖ   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR7   >  s    		c         C   sd   |  j  r d S|  j d } |  _ t | ƒ d } |  j j | d d ƒ rM d S|  j j | | d ƒ S(   NRv   i   s   .0s   >=Rƒ   s    lineend+1c(   R’  Rì  R  Rj   R  Rñ   (   R6   Rì  R  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR›  D  s    	t   classt   deft   fort   ift   tryt   whilec	   	      C   s^   |  j  r nN | | k r0 | | k r0 | |  _ n* | | k rZ |  j rZ | |  _ d |  _  n  d  S(   Ni   (   R’  R“  R”  (	   R6   Rh   t   tokent   startRƒ   R  t   INDENTt   NAMEt   OPENERS(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt
   tokeneaterM  s    		c         C   sm   t  j } |  j t  _ z; y t  j |  j |  j ƒ Wn t  j t f k
 rN n XWd  | t  _ X|  j |  j	 f S(   N(
   t	   _tokenizet   tabsizeRÖ   t   tokenizeR›  R   t
   TokenErrort   SyntaxErrorR“  R”  (   R6   t   save_tabsize(    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR7  Y  s    	
(   R•  R–  R—  R˜  R™  Rš  (	   R#   RT   R7   R›  R¡  R�  Rž  R   R7  (    (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyR…  7  s   		
	c         C   s>   |  j  d ƒ } | d k r4 |  |  |  | d }  n  | |  f S(   NR#  i    i   (   R|  (   R�  Rì  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRA  i  s    t   [t   bracketleftt   ]t   bracketrightt   /t   slashc         C   s  |  j  | ƒ } | s7 t j ƒ  r; | d d d h k r; d S| d } t j d d „  | ƒ } t j d d	 „  | ƒ } t j d
 d | ƒ } t j d d | ƒ } t j d d | ƒ } t j d d | ƒ } t j d d | ƒ } t j d d | ƒ } t j d d | ƒ } | S(   Ns   <<open-module>>s   <<goto-line>>s   <<change-indentwidth>>Rv   i    s   -[a-z]\bc         S   s   |  j  ƒ  j ƒ  S(   N(   t   groupt   upper(   R/   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRu   ‚  Rv   s   \b\w+\bc         S   s   t  j |  j ƒ  |  j ƒ  ƒ S(   N(   t   keynamesRñ   R­  (   R/   (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRu   ƒ  Rv   s   Key-t   Cancels
   Ctrl-Breaks   Control-s   Ctrl-R"  RC   s   ><R  R  R  (   Rñ   R   t	   isCocoaTkR
  t   sub(   R¼  R\  R½  R�  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyRÆ  x  s"    
c         C   sF   |  j  } | j d d d ƒ | j d d d ƒ | j d d d ƒ d  S(	   Nt   tcl_wordBreakAfters   a bi    RÏ   t   tcl_wordcharss   [a-zA-Z0-9_]t   tcl_nonwordcharss   [^a-zA-Z0-9_](   Rh  Ri  (   RŒ   Rh  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   fixwordbreaksŽ  s    	c         C   sr   |  } t  | ƒ t j d r- t j d } n d  } t j | d  ƒ t d | d | ƒ } | j j d | j	 ƒ d  S(   Ni   RŒ   R,   s   <<close-all-windows>>(
   R¶  R   t   argvR   R   t   setupAppRU   Rj   RI   R¢   (   R4   RŒ   R,   R3  (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   _editor_window—  s    
t   __main__(   R7  (/   R   R&   R†   R
  R   RŽ  Rù   R÷   Rs  t   idlelib.MultiCallR   R’  R   R   R   R   R   t   idlelib.configHandlerR   R   R	   R
   R   R   R@  t   python_versionR÷  R   R   R2   t   objectR3   t
   helpDialogRU   RR  RS  R£  R¡  R…  RA  R¯  RÆ  R¶  R¹  R#   t   idlelib.idle_test.htestR7  (    (    (    s,   /usr/lib64/python2.7/idlelib/EditorWindow.pyt   <module>   s^   
	!-	ÿ ÿ ÿ ÿ ÿ «		2		
				