ó
§xxTc           @   s  d  d l  Z  d  d l Z d  d l m 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 d  d l m Z m Z m Z d  d l m Z d Z d „  Z e d „ Z d e f d „  ƒ  YZ e ƒ  Z d „  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  e+ ƒ n  d S(&   iÿÿÿÿN(   t   python_version(   t   *(   t   MultiCallCreator(   t   idlever(   t
   WindowList(   t   SearchDialog(   t
   GrepDialog(   t   ReplaceDialog(   t   PyParse(   t   idleConf(   t   aboutDialogt   textViewt   configDialog(   t   macosxSupporti   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@   /opt/xtal/ccp4-6.5-linux32/lib/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@   /opt/xtal/ccp4-6.5-linux32/lib/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@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   __init__H   s    	c         C   s9   |  j  d k r |  j | ƒ n  | r5 |  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
        N(   R6   R   t   show_dialogt
   nearwindow(   R7   R5   t   near(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   displayL   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   +(   R5   R'   R(   t   joint   abspatht   dirnameR&   R   t	   view_filet   FalseR6   t   bindt   destroy(   R7   R5   t   fnR6   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR9   Y   s    	-"c         C   s\   |  j  } | j ƒ  d | j ƒ  d f } | j ƒ  | j d | ƒ | j ƒ  | j ƒ  d  S(   Ni
   s   =+%d+%d(   R6   t   winfo_rootxt   winfo_rootyt   withdrawt   geometryt	   deiconifyt   lift(   R7   R;   R6   t   geom(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR:   _   s    	 

c         C   s   d  |  _ d  |  _ d  S(   N(   R   R6   R5   (   R7   t   ev(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRF   j   s    	N(   R$   t
   __module__R8   R   R<   R9   R:   RF   (    (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR4   F   s
   			c         C   s   t  j |  ƒ d  S(   N(   t
   helpDialogR9   (   R5   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   _help_dialogo   s    t   EditorWindowc           B   s�  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 „  Z d d „ Z d€ d� d‚ dƒ d„ d… d† g Z e j d k rd‡ e d <n  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 d0 „ Z. d d1 „ Z/ d2 „  Z0 d3 „  Z1 d4 „  Z2 d5 „  Z3 d6 „  Z4 d7 „  Z5 d8 „  Z6 d9 „  Z7 d: „  Z8 d d; „ Z9 d d< „ Z: d d= „ Z; d> „  Z< d? „  Z= d@ „  Z> dA „  Z? dB „  Z@ dC „  ZA dD „  ZB dE „  ZC dF „  ZD dG „  ZE dH „  ZF dI „  ZG dJ „  ZH dK „  ZI d dL „ ZJ dM „  ZK dN „  ZL dO „  ZM dP „  ZN dQ „  ZO dR „  ZP dS „  ZQ dT „  ZR dU dV „ ZS dW „  ZT dU dX „ ZU dY „  ZV dZ „  ZW d[ „  ZX d\ „  ZY d] „  ZZ d^ „  Z[ d_ „  Z\ d` „  Z] da „  Z^ db „  Z_ d dc „ Z` d d dd „ Za de „  Zb d df „ Zc d dg „ Zd dh „  Ze di „  Zf dj „  Zg dk „  Zh ei dl „ Zj dm „  Zk dn „  Zl do „  Zm dp „  Zn dq „  Zo dr „  Zp ds „  Zq dt „  Zr du „  Zs dv „  Zt dw „  Zu dx „  Zv dy „  Zw dz „  Zx d{ „  Zy d| „  Zz d} „  Z{ d~ „  Z| 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  t j ƒ  }	 | |  _ | 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 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% |  j0 ƒ t1 j2 ƒ  r”| j/ d% |  j0 ƒ | j/ d& |  j3 ƒ n | j/ d' |  j3 ƒ | j/ d( |  j4 ƒ | j/ d) |  j5 ƒ | j/ d* |  j6 ƒ | j/ d+ |  j7 ƒ | j/ d, |  j8 ƒ | j/ d- |  j9 ƒ | j/ d. |  j: ƒ | j/ d/ |  j; ƒ | j/ d0 |  j< ƒ | j/ d1 d2 „  ƒ | j/ d3 |  j= ƒ | j/ d4 |  j> ƒ | j/ d5 |  j? ƒ | j/ d6 |  j@ ƒ | j/ d7 |  jA ƒ | j/ d8 |  jB ƒ | j/ d9 |  jC ƒ | j/ d: |  jD ƒ | j/ d; |  jE ƒ | j/ d< |  jF ƒ | j/ d= |  jG ƒ | j/ d> |  jH ƒ | j/ d? |  jI ƒ | j/ d@ |  jJ ƒ | j/ dA |  jK ƒ | j/ dB |  jL ƒ | j/ dC |  jM ƒ | j/ dD |  jN ƒ | j/ dE |  jO ƒ | j/ dF |  jP dG ƒ ƒ | j/ dH |  jP dI ƒ ƒ | j/ dJ |  jQ ƒ | j/ dK |  jR ƒ | j/ dL |  jS ƒ | r´| | j |  <| rb|  | jT | <n  | j/ dM |  jU ƒ | j/ dN |  j jV ƒ | j/ dO |  jW ƒ | j/ dP |  jX ƒ n  |  jY ƒ  | jZ | dQ <| j[ dR t\ dS t] ƒ | j^ | dT <dU } t j$ d d dV d dW ƒrdX } n  | j_ dY t j$ d d dY ƒ t j$ d d dZ d d ƒ| f ƒ | j[ dR t` dS ta d[ dI ƒ | j[ dR tb dS ta d[ dI ƒ | jc ƒ  t j$ d d\ d] d dW ƒ} | |  _d d^ |  _e |  je |  _f |  jg ƒ  th |  _i di |  _j |  jk | ƒ |  _l } |  jm ƒ  |  _n } | jo | ƒ | jp | _p | jq | _q | jr |  js ƒ |  jt |  ƒ |  _u } | jv |  jw ƒ t |  j ƒ |  _x |  jy db jz d dc dd de dG d |  jx ƒ|  j{ ƒ  d  |  _| | r
	t j j} | ƒ rút j j | ƒ rú| j~ | ƒ q
	| j | ƒ n  |  j€ ƒ  |  js ƒ  |  j� |  j‚ | ƒ ƒ |  jƒ ƒ  |  jy j„ df ƒ } | r¹	| j… dg ƒ } | d  k rz	dh } n  | dG k r�	| j† ƒ  | dI } n  | |  _‡ t jˆ |  j‰ ƒ n  tŠ j‹ |  _‹ tŒ j� |  _� tŠ jŽ |  _Ž |  j� ƒ  d  S(j   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   http://docs.python.org/%d.%di   s   >>> t   menus   recent-files.lstt   namet   vbart   mainRS   t   widtht   typet   intt   texti   t   padxt   nonet   wrapt   heightg      !@t   wordprocessort   tabstylet   WM_DELETE_WINDOWs   <<close-window>>s   <Control-Button-1>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@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   <lambda>Ú   s    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>i    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   normals	   font-boldt   boolt   boldt   fonts	   font-sizet   expandt   Indents
   use-spacesi   i2   iô  i@KL R+   t   labels   Recent Filest	   underlinet   windowst   endiÿÿÿÿ(   i2   iô  i@KL (�   RS   t   help_urlR   R'   R(   R@   R   t   prefixt   platformt   countR   t   isdirR   t   isfilet   normpathR	   t   CurrentThemet   flistt   roott   ps1R"   t   Menut   menubarR   t   ListedToplevelt   topt   varst   tkinter_varst   inversedictt   instance_dictt   GetUserCfgDirt   recent_files_patht   Framet
   text_framet	   ScrollbarRc   t	   GetOptionRe   t	   TkVersionR   t   TextRh   t   focused_widgett   createmenubart   apply_bindingst   protocolR   RE   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   configt   LEFTt   BOTHt   TOPt	   focus_sett   usetabst   tabwidtht   indentwidtht   set_notabs_indentwidthRD   t   context_use_ps1t   num_context_linesRT   t   perRV   t   undot   insertfiltert   undo_block_startt   undo_block_stopt   set_saved_change_hookt   saved_change_hookRW   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	   showerrort   _highlight_workaround(   R7   R‰   R-   t   keyRŠ   t   dochomet   pyvert   basepatht   chmfilet   currentThemeR�   R—   Rc   t   text_optionsRh   t
   fontWeightt	   usespacesRÙ   RÚ   Rà   Ra   R€   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR8   ~   s@   					



	


	
		

	%


	
	c            s„   t  j j d ƒ s d  S|  j ‰ ˆ j d d ƒ ˆ j d d ƒ ‡ f d †  ‰  ˆ j d ‡  f d †  ƒ ˆ j d ‡  f d †  ƒ d  S(	   NR_   s   <<Highlight-FocusOut>>s
   <FocusOut>s   <<Highlight-FocusIn>>s	   <FocusIn>c            s’   ˆ  j  d ƒ } | rŽ |  d k ri t j t j ƒ  d ƒ } ˆ  j d | ƒ ˆ  j d ƒ ˆ  j d | Œ qŽ |  d k rŽ ˆ  j d d d ƒ qŽ n  d  S(   Nt   selt   outt   hilitet   sel_fixt   ins   1.0R€   (   t
   tag_rangesR	   t   GetHighlightRˆ   t
   tag_configt	   tag_raiset   tag_addt
   tag_remove(   t   focust	   sel_ranget   HILITE_CONFIG(   Rh   (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   highlight_fixl  s    c            s
   ˆ  d ƒ S(   NR  (    (   RO   (   R  (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRr   y  s    c            s
   ˆ  d ƒ S(   NR  (    (   RO   (   R  (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRr   {  s    (   R   Rƒ   t
   startswithRh   t	   event_addRE   (   R7   (    (   R  Rh   s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRú   b  s    			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   decodeRX   t   UnicodeDecodeErrorRY   (   R7   R-   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   _filename_to_unicode~  s    c         C   s)   |  j  j ƒ  \ } } |  j j | ƒ d S(   NRp   (   Rà   t   defaultfilenameR‰   t   new(   R7   Rq   RB   t   basename(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRÄ   �  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   cR  s   1.0R€   s	   sel.firstt	   my_anchort   <s   sel.lastt   >Rp   (   R  s   	(   t   statet   keysymRh   Rð   t   compareRg   R   Rï   t   xranget   lent   strR  t   mark_setR  t   see(   R7   Rq   t   insertptt   linet   lineatt   destt   firstt   last(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRÂ   ’  s>    "(%	0c         C   sÎ   |  j  |  j ƒ |  _ t j d k r@ |  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
 j d
 |  j ƒ |  j
 j d
 d d ƒ |  j
 j |  j ƒ d  S(   NR`   t	   _padding1s       Rt   t   columns   Col: ?R.  s   Ln: ?Ru   s   <<set-line-and-column>>s   <KeyRelease>s   <ButtonRelease>(   R\   R�   t
   status_barR   Rƒ   t	   set_labelRË   RÊ   t   BOTTOMt   XRh   RE   t   set_line_and_columnR  t
   after_idle(   R7   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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   R4  s   Col: %sR.  s   Ln: %s(   Rh   Rð   t   INSERTR   R5  R6  (   R7   Rq   R.  R4  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR9  É  s    !R+   t   _Filet   editt   _Editt   formatt   F_ormatt   runt   _Runt   optionst   _OptionsR   t   _Windowst   helpt   _HelpR`   t   _Windowiþÿÿÿc         C   sè   |  j  } i  |  _ } x_ |  j D]T \ } } t | ƒ \ } } t | d | ƒ| | <} | j d | d | d | ƒ q  Wt j ƒ  r· t | d d ƒ| d <} | j d d d | ƒ n  |  j ƒ  |  j d j	 t
 ƒ |  _ |  j ƒ  d  S(	   NRb   R}   Ra   R~   t   applet   applicationt   IDLERF  (   R�   Rä   t
   menu_specst   prepstrRŒ   t   add_cascadeR   t
   isCarbonTkt
   fill_menusRð   t   ENDt   base_helpmenu_lengtht   reset_help_menu_entries(   R7   t   mbarRä   Rb   R}   R~   Ra   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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(   R7   Ra   R€   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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   R_   t   cursort   arrowR%  t   ibeam(   Rh   R+  t   xt   yt   rmenut
   make_rmenuRq   R   Rƒ   RÎ   t   rmenu_specst
   ValueErrorR   t   getattrt   entryconfiguret   tk_popupt   x_roott   y_root(	   R7   Rq   R\  t   iswint   itemR}   t	   eventnamet   verify_stateR%  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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(   Nt   tearoffi    i   c         S   s   |  j  | ƒ d  S(   N(   t   event_generate(   Rh   Rg  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRs     s    R}   Rs   (   RŒ   Rh   R^  R   t   add_commandRñ   R\  (   R7   R\  Rf  R}   Rg  Rs   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR]    s    c         C   s
   |  j  ƒ  S(   N(   t   rmenu_check_copy(   R7   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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   disabledRw   (   Rh   Rð   t   TclError(   R7   t   indx(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRm  &  s
    c         C   s=   y  |  j  j j d |  j  d ƒ Wn t k
 r4 d SXd Sd  S(   Ns   tk::GetSelectiont	   CLIPBOARDRo  Rw   (   Rh   t   tkt   callRp  (   R7   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   rmenu_check_paste.  s
     c         C   s   t  j |  j d ƒ d  S(   Ns
   About IDLE(   R
   t   AboutDialogR�   (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR©   6  s    c         C   s   t  j |  j d ƒ d  S(   Nt   Settings(   R   t   ConfigDialogR�   (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRª   9  s    c         C   s8   |  j  r |  j  } n	 |  j } t j | d |  j ƒd  S(   NR;   (   RŠ   R�   RQ   R<   (   R7   Rq   R5   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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   R_   t   titles   Document Start Failuret   messageR5   Rp   (   R   Rƒ   R'   t	   startfileR�   t   WindowsErrorRõ   Rù   R*  Rh   t
   webbrowsert   open(   R7   Rq   t   why(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR¨   C  s    c         C   s   |  j  j d ƒ d S(   Ns   <<Cut>>Rp   (   Rh   Rk  (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR£   N  s    c         C   s*   |  j  j d ƒ s d  S|  j  j d ƒ d S(   NR  s   <<Copy>>Rp   (   Rh   R	  Rk  (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR¤   R  s    c         C   s$   |  j  j d ƒ |  j  j d ƒ d S(   Ns	   <<Paste>>R   Rp   (   Rh   Rk  R,  (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR¥   Y  s    c         C   s=   |  j  j d d d ƒ |  j  j d d ƒ |  j  j d ƒ d S(   NR  s   1.0s   end-1cR   Rp   (   Rh   R  R+  R,  (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR¬   ^  s    c         C   s*   |  j  j d d d ƒ |  j  j d ƒ d  S(   NR  s   1.0R€   R   (   Rh   R  R,  (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR­   d  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%  Rp  (   Rq   (   t
   edge_indext   edges_tablet   self_text_indext   self_text_mark_set(    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   move_at_edges  s    
(   s   sel.first+1cs   sel.last-1c(   Rh   Rð   R+  (   R7   R€  R„  (    (   R€  R�  R‚  Rƒ  s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR¿   h  s
    c         C   s   |  j  j d ƒ d S(   Ns   <Meta-Delete>Rp   (   Rh   Rk  (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRÀ   |  s    c         C   s   |  j  j d ƒ d S(   Ns   <Meta-d>Rp   (   Rh   Rk  (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRÁ   €  s    c         C   s   t  j |  j ƒ d S(   NRp   (   R   t   findRh   (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR®   „  s    c         C   s   t  j |  j ƒ d S(   NRp   (   R   t
   find_againRh   (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR¯   ˆ  s    c         C   s   t  j |  j ƒ d S(   NRp   (   R   t   find_selectionRh   (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR±   Œ  s    c         C   s    t  j |  j |  j |  j ƒ d S(   NRp   (   R   t   grepRh   Rà   R‰   (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR°   �  s    c         C   s   t  j |  j ƒ d S(   NRp   (   R   t   replaceRh   (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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:R5   Rp   i    R   s   %d.0(   Rh   R÷   Rø   R   t   bellR+  R,  (   R7   Rq   Rh   t   lineno(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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 | ƒ d  S(   Ns	   sel.firsts   sel.lastt    t   ModulesA   Enter the name of a Python module
to search on sys.path and open:R5   t   initialvalues   Import errors   Unsupported types   %s is not a source module(   Rh   Rï   Rp  t   stripR÷   t	   askstringR3   t	   NameErrorR#   Rõ   Rù   R*  R   R   R   R‰   R~  Rà   Ré   (	   R7   Rq   Rb   t   fR+   t   suffixt   modeRf   t   msg(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR«   ¤  s4    
	"		c         C   s™   |  j  j } | s< t j d d d |  j ƒ|  j j ƒ  d  St j j	 | ƒ \ } } t j j
 | ƒ \ } } d d l m } | j |  j | | g ƒ d  S(   Ns   No filenames&   This buffer has no associated filenamet   masteriÿÿÿÿ(   t   ClassBrowser(   Rà   R-   Rõ   Rù   Rh   RÒ   R   R'   R(   R   R)   t   idlelibR˜  R‰   (   R7   Rq   R-   t   headt   tailR1   R2   R˜  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRÆ   Å  s    
c         C   s$   d d l  m } | j |  j ƒ d  S(   Niÿÿÿÿ(   t   PathBrowser(   R™  Rœ  R‰   (   R7   Rq   Rœ  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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   Rh   R+  R  R  t   center(   R7   RŒ  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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   normcaseR~  t   readlineR   t   IOErrorRD   R  R…  (   R7   R-   R1   R2   R“  R.  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRí   Þ  s    $c         C   s)   |  j  r% |  j  j |  ƒ d  |  _  n  d  S(   N(   R‰   t   unregister_maybe_terminateR   (   R7   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt
   close_hookì  s    	c         C   s   | |  _  d  S(   N(   R¥  (   R7   R¥  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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ë   (   R7   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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-   RU   RÙ   t   removefilterRÚ   RÛ   (   R7   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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   (   R7   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   _rmcolorizer  s
    	c         C   s¤   |  j  ƒ  |  j ƒ  t j d d d ƒ } t j | d ƒ } t j | d d d ƒ} t j | d ƒ } |  j j d	 | d	 d
 | d
 d | d | d	 d | d
 ƒ d S(   s   Update the colour themeRd   t   ThemeRb   Rw   RW  t   fgBgt   fgR  t
   foregroundt
   backgroundt   insertbackgroundt   selectforegroundt   selectbackgroundN(   R¬  Rª  R	   R™   R
  Rh   RÎ   (   R7   t   themet   normal_colorst   cursor_colort   select_colors(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRë     s    




c      	   C   sn   d } t  j d d d d d ƒr* d } n  |  j j d t  j d d d ƒ t  j d d d	 d d
 ƒ| f ƒ d S(   s.   Update the text widgets' font if it is changedRw   Rd   RS   s	   font-boldRf   Rx   Ry   Rz   s	   font-sizeRg   N(   R	   R™   Rh   RÎ   (   R7   R  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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   GetCurrentKeySetRZ   t   default_keydefst   itemsRh   t   event_deletet   get_standard_extension_namest   GetExtensionBindings(   R7   t   keydefsRq   t   keylistt   extensionNamet   xkeydefs(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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   Rs   t   acceleratorR}   R�  N(   R	   Rº  RZ   R»  Rž   R¾  R¿  t   menudefsRM  Rä   t   keysRð   RQ  R   t   rangeRf   t	   entrycgett   get_acceleratort   entryconfig(   R7   RÀ  RÂ  RÃ  t   menuEventDictRa   Rf  t   menubarItemR€   Rð   t   accelt   itemNameRq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   ApplyKeybindings5  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 windowRd   R|   s
   num-spacesRf   Rg   N(   RÓ   R	   R™   RÕ   (   R7   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRÖ   Y  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 menuRF  i   R}   i    Rs   N(
   R	   t   GetAllExtraHelpSourcesListRä   Rð   RQ  RR  RU  Rñ   t"   _EditorWindow__extra_help_callbackRl  (   R7   t	   help_listt   helpmenut   helpmenu_lengtht   entryt   cmd(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRS  `  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   R_   Ry  s   Document Start FailureRz  R5   (   RØ  RÙ  (   R  R'   R(   R‡   R   Rƒ   R{  R|  Rõ   Rù   R*  Rh   R}  R~  (   t   helpfileR  (   R7   (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   display_extra_helps  s    (    (   R7   RÚ  RÛ  (    (   R7   s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   __extra_help_callbackq  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    t    iÿÿÿÿt   1234567890ABCDEFGHIJKt   wt   recentfilelist_error_displayedRy  s
   IDLE ErrorRz  s&   Unable to update Recent Files list:
%sR5   R}   R  Rs   R~   (!   R'   R(   Rè   R•   R~  t	   readlinesRA   t   removeR   t   appendR)  t
   writelinesR£  R`  RŠ   RD   R   Rá  Rõ   Rù   R*  Rh   R�   R“   RÇ  Rã   RU  RQ  t	   enumeratet   rstripR  t#   _EditorWindow__recent_file_callbackRl  (   R7   t   new_filet   rf_listt   rf_list_filet	   bad_pathsR(   t   ulcharst   rf_filet   errt   instanceRa   t   it	   file_namet
   ufile_namet   callback(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRæ   €  sH    &%	c            s   | ‡  f d † } | S(   Nc            s   ˆ  j  j d |  ƒ d  S(   Nt   editFile(   Rà   R~  (   t
   fn_closure(   R7   (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   open_recent_file«  s    (    (   R7   Rò  R÷  (    (   R7   s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   __recent_file_callbackª  s    c         C   s²   |  j  ƒ  } |  j ƒ  } | r5 | r5 | d | } n$ | rD | } n | rS | } n d } | ph | ph | } |  j ƒ  sŽ d | } d | } n  |  j j | ƒ |  j j | ƒ d  S(   Ns    - t   Untitleds   *%s*s   *%s(   t   short_titlet
   long_titlet	   get_savedR�   t   wm_titlet   wm_iconname(   R7   t   shortt   longRy  t   icon(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRß   ¯  s    		
c         C   s   |  j  j ƒ  S(   N(   RÚ   Rü  (   R7   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRü  Á  s    c         C   s   |  j  j | ƒ d  S(   N(   RÚ   t	   set_saved(   R7   t   flag(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR  Ä  s    c         C   s   |  j  j ƒ  d  S(   N(   RÚ   t
   reset_undo(   R7   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR  Ç  s    c         C   sO   d t  ƒ  d } |  j j } | r8 t j j | ƒ } n d } | |  j | ƒ S(   Ns   Python s   : Rù  (   R    Rà   R-   R'   R(   R  R  (   R7   t	   pyversionR-   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRú  Ê  s    c         C   s   |  j  |  j j p d ƒ S(   NR�  (   R  Rà   R-   (   R7   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRû  Ô  s    c         C   s   |  j  ƒ  d  S(   N(   R�  (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR¦   Ø  s    R   c         C   sb   |  j  } |  j ƒ  \ } } |  j | ƒ } | | } t d | | d ƒ } | j t | ƒ ƒ d  S(   Ni   i   (   Rh   t   getwindowlinest	   getlinenot   maxRÉ   t   float(   R7   t   markRh   R�   t   botRŒ  Rl   t   newtop(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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   Rl   (   Rh   R  t   winfo_heightRg   (   R7   Rh   R�   R  Rl   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR  ã  s    	c         C   s"   |  j  } t t | j | ƒ ƒ ƒ S(   N(   Rh   Rg   R	  Rð   (   R7   R
  Rh   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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   mapRg   t   groups(   R7   RN   R0   t   tuple(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   get_geometryñ  s    c         C   s   |  j  ƒ  d  S(   N(   R   (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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(   NRw   (   Rà   Rü  R�   R%  RL   t   lowerRM   t	   maybesave(   R7   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR  û  s    	c         C   s/   |  j  ƒ  } t | ƒ d k r+ |  j ƒ  n  | S(   Nt   cancel(   R  R*  t   _close(   R7   t   reply(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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ç   RD   Rh   R‘   RÙ   R�   RF   R¥  (   R7   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR  
  s"    
							c         C   s   i  |  _  |  j ƒ  d  S(   N(   t
   extensionst   load_standard_extensions(   R7   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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   (   R7   t   ins(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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(   R7   Rb   R#  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR  (  s    c         C   s   t  j d t ƒ S(   Nt   editor_only(   R	   t   GetExtensionsR   (   R7   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR¾  1  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#   R`  R	   R¿  R  RP  RÆ  R  Rž   RÇ  R‰  Rh   RE   (   R7   Rb   t   modt   clsRÀ  R   t   veventt
   methodname(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR!  4  s,    	
c         C   sg   | d  k r |  j j } n  |  j } | | _ x3 | j ƒ  D]% \ } } | r: | j | | Œ q: q: Wd  S(   N(   R   RZ   R»  Rh   RÀ  R¼  R  (   R7   RÀ  Rh   Rq   RÁ  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRž   L  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(   Rk  (   Rh   Rg  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRs   n  s    R}   R~   Rs   RÅ  t   variableN(   R   RZ   RÆ  R»  Rä   Rh   Rï   Rñ   RM  RÊ  t   get_var_objt
   BooleanVart   add_checkbuttonRl  (   R7   RÆ  RÀ  Rä   Rh   t   mnamet	   entrylistRa   RÖ  R}   Rg  t   checkbuttonR~   RÅ  Rs   t   var(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRP  U  s8    		
c         C   s2   |  j  | ƒ } | r% | j ƒ  } | St | ‚ d  S(   N(   R2  Rï   R’  (   R7   Rb   R8  t   value(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   getvarz  s
    c         C   s5   |  j  | | ƒ } | r( | j | ƒ n	 t | ‚ d  S(   N(   R2  RÍ   R’  (   R7   Rb   R9  t   vartypeR8  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   setvar‚  s    c         C   s@   |  j  j | ƒ } | r< | r< | |  j ƒ |  j  | <} n  | S(   N(   R‘   Rï   Rh   (   R7   Rb   R;  R8  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR2  ‰  s    c         C   s<   |  j  r4 |  j j d | ƒ p3 d |  j j | ƒ k Sd Sd  S(   Nt   TODOt   STRINGi   (   Rç   Rh   t   tag_prevranget	   tag_names(   R7   t
   text_index(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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(   Rh   Rð   Rp  R   (   R7   R1  R2  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   get_selection_indices¥  s    c         C   s   |  j  d p t } t | ƒ S(   Nt   tabs(   Rh   t   TK_TABWIDTH_DEFAULTRg   (   R7   t   current(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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(   NRz   t   measures
   -displayoft   nRD  (   Rh   RG  Rs  Rt  R—  t	   configure(   R7   t   newtabwidthRh   t   pixels(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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Ô   RD   RÓ   RM  (   R7   Rí   t   guessRñ  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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
 k sí t
 ‚ | d |  j |  j } |  j r't j j d ƒ d }	 n d }	 d
 }
 x\ | |	 k rFPn  | d  } |
 d }
 t | j	 | ƒ ƒ } | | k s‹| d d	 k r6Pq6q6| j ƒ  | j d |
 d ƒ | | k  r×| j d d | | ƒ n  | j ƒ  d S(   NR   Rp   s   insert linestartR�  R$  s   1.0s	   insert-1ciÿÿÿÿs    	i    i   s   
s
   insert-%dcR  (   Rh   RC  RU  R+  Rï   R'  R‹  RÔ   R)  t
   expandtabst   AssertionErrorRÕ   R×   R   R‹   R   RÜ   R   RÝ   (   R7   Rq   Rh   R1  R2  t   charsRÔ   t   havet   wantt   last_line_of_promptt   ncharsdeleted(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR´   Í  sJ    	
		



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  Rp   (   Rh   RC  RÜ   t
   index2lineR·   RU  R+  Rï   t
   classifywsRÔ   R)  t   reindent_toRÕ   RÓ   RP  R   R,  RÝ   (
   R7   Rq   Rh   R1  R2  R‚   t   rawt	   effectivet   padRI  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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 r�| t j k rânª | t j k r| j d | ƒ nˆ | t j k r)|  j  | j! ƒ  ƒ nc | t j" k rs| j# ƒ  d k r]| j d | ƒ qŒ|  j  | j$ ƒ  ƒ n d sŒt% d | f ƒ ‚ 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   
Rp   iÿÿÿÿs   insert - %d charss   .0t   consoles   1.0s   bogus continuation type %r(-   Rh   RC  RÜ   RU  R+  Rï   R)  R   R   R‹   R   RW  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_BRACKETRY  t   compute_bracket_indentt   C_BACKSLASHt   get_num_lines_in_stmtt   compute_backslash_indentRQ  t   get_base_indent_stringt   is_block_openerR¶   t   is_block_closerR´   R,  RÝ   (   R7   Rq   Rh   R1  R2  R.  Rñ  RI  t   indentRU  t   lnoR[  t   contextt   startatt   startatindext   rawtextt   bodRÝ  R!  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRµ      sŠ    	

%
	c         C   s   | |  j  d „ } | S(   Nc         S   s   | | d |  ƒ S(   Ns   +%dc(    (   t   offsett   _startindext   _icis(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   innerŒ  s    (   RB  (   R7   t
   startindexRy  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRa  ‹  s    c   
      C   s¢   |  j  ƒ  \ } } } } xm t t | ƒ ƒ D]Y } | | } | r+ t | |  j ƒ \ } }	 |	 |  j }	 |  j |	 ƒ | | | | <q+ q+ W|  j | | | | ƒ d S(   NRp   (   t
   get_regionRÈ  R)  RX  RÔ   RÕ   t   _make_blankst
   set_region(
   R7   Rq   Rš  R›  RR  t   linest   posR.  RZ  R[  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR·   ‘  s    
"c   
      C   s«   |  j  ƒ  \ } } } } xv t t | ƒ ƒ D]b } | | } | r+ t | |  j ƒ \ } }	 t |	 |  j d ƒ }	 |  j |	 ƒ | | | | <q+ q+ W|  j | | | | ƒ d S(   Ni    Rp   (	   R{  RÈ  R)  RX  RÔ   R  RÕ   R|  R}  (
   R7   Rq   Rš  R›  RR  R~  R  R.  RZ  R[  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR¸   œ  s    
"c         C   sk   |  j  ƒ  \ } } } } x6 t t | ƒ d ƒ D] } | | } d | | | <q/ W|  j | | | | ƒ d  S(   Ni   s   ##(   R{  RÈ  R)  R}  (   R7   Rq   Rš  R›  RR  R~  R  R.  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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   #(   R{  RÈ  R)  R}  (   R7   Rq   Rš  R›  RR  R~  R  R.  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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  (   R{  t   _asktabwidthR   RÈ  R)  RX  t   divmodR}  (   R7   Rq   Rš  R›  RR  R~  RÔ   R  R.  RZ  R[  t   ntabst   nspaces(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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(   R{  R�  R   RÈ  R)  RP  R}  (   R7   Rq   Rš  R›  RR  R~  RÔ   R  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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 columnsR5   i   Rp   (   R…  R†  (   s   will bes
   remains at(   Rö   RÓ   Rh   RÕ   (   R7   Rq   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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)R5   R�  t   minvaluei   t   maxvaluei   Rp   (   Rø   Rh   RÕ   RÓ   (   R7   Rq   R  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/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   
(   Rh   RC  Rð   Rï   R   (   R7   Rh   R1  R2  Rš  R›  RR  R~  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR{  ñ  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   (
   Rh   R@   R‹  R  R+  RÜ   RU  R   RÝ   R  (   R7   Rš  R›  RR  R~  Rh   t   newchars(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR}  þ  s    	


c         C   s=   |  j  r1 t | |  j ƒ \ } } d | d | Sd | Sd  S(   Ns   	R  (   RÓ   R‚  RÔ   (   R7   RI  Rƒ  R„  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR|    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   (   Rh   RÜ   R'  RU  R   R|  RÝ   (   R7   R4  Rh   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRY    s    	
c         C   s.   |  j  d d d |  j d |  j d d d d ƒS(	   Ns	   Tab widths   Columns per tab? (2-16)R5   R�  R‡  i   Rˆ  i   (   Rø   Rh   RÕ   (   R7   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR�  !  s    		c         C   sr   t  |  j |  j ƒ j ƒ  \ } } | r` | r` t | |  j ƒ \ } } t | |  j ƒ \ } } n
 d } } | | S(   Ni    (   t   IndentSearcherRh   RÔ   RA  RX  (   R7   t   openert   indentedRZ  t   indentsmallt   indentlarge(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRN  /  s    !
N(   s   fileR<  (   s   editR>  (   s   formatR@  (   s   runRB  (   RC  RD  (   s   windowsRE  (   s   helpRG  (   s   windowsRH  (   Ri  s   <<close-window>>N(}   R$   RP   t   idlelib.PercolatorRT   t   idlelib.ColorDelegatorRU   t   idlelib.UndoDelegatorRV   t   idlelib.IOBindingRW   RX   RY   R™  RZ   t   TkinterR[   t   idlelib.MultiStatusBarR\   R   R�   R8   Rú   R  RÄ   RÂ   RÈ   R9  RL  R   Rƒ   R�   Rô   R\  R¢   R^  R]  Rn  Rm  Ru  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Ö   RS  RÒ  Ræ   Rè  Rß   Rü  R  R  Rú  Rû  R¦   R�  R  R  R  R    R  R   R  Rî   R  R  R¾  R!  Rž   RP  R:  R<  R2  RB  RC  RG  RM  R   Rì   R´   R¶   Rµ   Ra  R·   R¸   R¹   Rº   R»   R¼   R½   R¾   R{  R}  R|  RY  R�  RN  (    (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRS   s   sì   ä				)				
																		!											$			*						
			
													%							0	#	k												
			c         C   s   t  t |  ƒ ƒ S(   N(   Rg   R	  (   Rð   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRW  9  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Ô   RZ  R[  t   ch(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRX  A  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    (   Rh   RÔ   Rñ  t   finishedR   t   blkopenlinet   indentedline(   R7   Rh   RÔ   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR8   Y  s    		c         C   sd   |  j  r d S|  j d } |  _ t | ƒ d } |  j j | d d ƒ rM d S|  j j | | d ƒ S(   NR�  i   s   .0s   >=R€   s    lineend+1c(   R—  Rñ  R"  Rh   R'  Rï   (   R7   Rñ  R
  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyR¢  _  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™  (	   R7   Rf   t   tokent   startR€   R.  t   INDENTt   NAMEt   OPENERS(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt
   tokeneaterh  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™  (   R7   t   save_tabsize(    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRA  t  s    	
(   Rš  R›  Rœ  R�  Rž  RŸ  (	   R$   RP   R8   R¢  R¦  R¢  R£  R¥  RA  (    (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRŠ  R  s   		
	c         C   s>   |  j  d ƒ } | d k r4 |  |  |  | d }  n  | |  f S(   NR(  i    i   (   R…  (   R•  Rñ  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRM  „  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>>R�  i    s   -[a-z]\bc         S   s   |  j  ƒ  j ƒ  S(   N(   t   groupt   upper(   R0   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRr   �  s    s   \b\w+\bc         S   s   t  j |  j ƒ  |  j ƒ  ƒ S(   N(   t   keynamesRï   R²  (   R0   (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRr   ž  s    s   Key-t   Cancels
   Ctrl-Breaks   Control-s   Ctrl-R'  R?   s   ><R  R#  R$  (   Rï   R   t	   isCocoaTkR  t   sub(   RÀ  Rg  RÁ  R•  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyRÊ  “  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_](   Rs  Rt  (   RŠ   Rs  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   fixwordbreaks©  s    	c         C   s|   |  } t  | ƒ t j d r- t j d } n d  } t j | d  ƒ t d | d | ƒ } | j j d | j	 ƒ |  j
 ƒ  d  S(   Ni   RŠ   R-   s   <<close-all-windows>>(   R»  R   t   argvR   R   t   setupAppRS   Rh   RE   R    t   mainloop(   R5   RŠ   R-   R=  (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   _editor_window²  s    
t   __main__(   RA  (/   R   R'   Rƒ   R    R  R   R“  R÷   Rõ   R}  t   idlelib.MultiCallR   R™  R   R   R   R   R   R   t   idlelib.configHandlerR	   R
   R   R   R   RE  R   R   R3   t   objectR4   RQ   RR   RS   RW  RX  R¨  R¦  RŠ  RM  R´  RÊ  R»  R¿  R$   t   idlelib.idle_test.htestRA  (    (    (    s@   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/idlelib/EditorWindow.pyt   <module>   s^   
	!(		ÿ ÿ ÿ ÿ ÿ Ë		2		
				