-í
°¦T<c       s_     d  Z    d k Z  d k Z  d k Z  d k Z  d Z $ d f  d „  ƒ  YZ d S(   st  Extension to execute code outside the Python shell window.

This adds the following commands (to the Edit menu, until there's a
separate Python menu):

- Check module (Alt-F5) does a full syntax check of the current module.
It also runs the tabnanny to catch any inconsistent tabs.

- Import module (F5) is equivalent to either import or reload of the
current module.  The window must have been saved previously. The
module is added to sys.modules, and is also added to the __main__
namespace.  Output goes to the shell window.

- Run module (Control-F5) does the same but executes the module's
code in the __main__ namespace.

NsX  Error: Inconsistent indentation detected!

This means that either:

(1) your indentation is outright incorrect (easy to fix), or

(2) your indentation mixes tabs and spaces in a way that depends on how many spaces a tab is worth.

To fix case 2, change all tabs to spaces by using Select All followed by Untabify Region (both in the Edit menu).s   ScriptBindingc      sÅ   $ & h  d d g d <d g d <d g d <Z  , d e d	 d f d
 d f d d f g f g Z 5 d „  Z < d „  Z E d „  Z V d „  Z p d „  Z ˆ d „  Z – d „  Z	 © d „  Z
 RS(   Ns   <Alt-F5>s	   <Meta-F5>s   <<check-module>>s   <F5>s   <<import-module>>s   <Control-F5>s   <<run-script>>s   edits   Check modules   Import modules
   Run scriptc    s7   5 6 | |  _  9 |  i  i |  _ : |  i i |  _ d  S(   N(   s   editwins   selfs   flists   root(   s   selfs   editwin(    (    s*   /mit/python/share/idlelib/ScriptBinding.pys   __init__5 s   c    sj   < = |  i ƒ  } > | o ? d  Sn @ |  i | ƒ o A d  Sn B |  i | ƒ o C d  Sn d  S(   N(   s   selfs   getfilenames   filenames   tabnannys   checksyntax(   s   selfs   events   filename(    (    s*   /mit/python/share/idlelib/ScriptBinding.pys   check_module_event< s   c    sí   E F d  k  } G d  k } H t | d ƒ } I y  J | i | i | i ƒ ƒ Wn K | i j
 o0 } L |  i d M d t | ƒ ƒ N d SnO O | i j
 o< } Q |  i i | i ƒ  ƒ R |  i d t ƒ S d Sn XT d Sd  S(   Ns   rs   Token errors   Token error:
%si    s   Tab/space errori   (   s   tabnannys   tokenizes   opens   filenames   fs   process_tokenss   generate_tokenss   readlines
   TokenErrors   msgs   selfs   errorboxs   strs   NannyNags   nags   editwins   gotolines
   get_linenos   indent_message(   s   selfs   filenames   tabnannys   nags   tokenizes   msgs   f(    (    s*   /mit/python/share/idlelib/ScriptBinding.pys   tabnannyE s    c    sš  V W t  | d ƒ } X | i ƒ  } Y | i ƒ  Z d | j o( [ d  k }	 \ |	 i d d | ƒ } n ] | o | d d j o ^ | d } n _ y ` t | | d ƒ WnÝ a t	 t
 f j
 oÈ } b yX c | \ } \ } } } }
 d | o. e | | | | |
 f f | _ f | | _ n Wn& g h t } i d t | ƒ } n Xj | o k |  i i | ƒ n l |  i d m d	 | ƒ n Xn d
 Sd  S(   Ns   rs   s   \r\ns   
iÿÿÿÿs   execs   *** s   Syntax errors"   There's an error in your program:
i   (   s   opens   filenames   fs   reads   sources   closes   res   subs   compiles   SyntaxErrors   OverflowErrors   errs   msgs   errorfilenames   linenos   offsets   lines   argss   Nones   strs   selfs   editwins   gotolines   errorbox(   s   selfs   filenames   errs   fs   errorfilenames   sources   linenos   offsets   msgs   res   line(    (    s*   /mit/python/share/idlelib/ScriptBinding.pys   checksyntaxV s0   	
c 
   sf  p q |  i ƒ  } r | o s d  Sn u t i i t i i | ƒ ƒ \ } } v t	 i
 i | ƒ o w t	 i
 | }	 n# y t i | ƒ }	 z |	 t	 i
 | <{ | |	 _ | t t	 i
 d | |	 ƒ ~ t i i | ƒ }  t i i t i i | ƒ ƒ } € | t	 i j o  t	 i i d | ƒ n ƒ |  i i } „ | i ƒ  } … | i } † | i d | ƒ d  S(   Ns   __main__i    s
   reload(%s)(   s   selfs   getfilenames   filenames   oss   paths   splitexts   basenames   modnames   exts   syss   moduless   has_keys   mods   imps
   new_modules   __file__s   setattrs   dirnames   dirs   normpaths   abspaths   inserts   editwins   flists
   open_shells   shells   interps   runcode(
   s   selfs   events   modnames   shells   interps   filenames   exts   flists   dirs   mod(    (    s*   /mit/python/share/idlelib/ScriptBinding.pys   import_module_eventp s$   '!c    s³   ˆ ‰ |  i ƒ  } Š | o ‹ d  Sn  |  i i } Ž | i ƒ  }  | i }  t i	 p) t
 i i t i	 d ƒ t
 i i | ƒ j o “ | g t _	 n ” | i | ƒ d  S(   Ni    (   s   selfs   getfilenames   filenames   editwins   flists
   open_shells   shells   interps   syss   argvs   oss   paths   basenames   execfile(   s   selfs   events   shells   filenames   interps   flist(    (    s*   /mit/python/share/idlelib/ScriptBinding.pys   run_script_eventˆ s   :c    sÅ   – ™ |  i i ƒ  oe š |  i i ƒ  p |  i i ƒ  p d }  |  i d ž d | d ƒ   |  i i i ƒ  ¡ d  Sn ¢ |  i i	 i
 } £ | o! ¤ |  i d ¥ d ƒ ¦ d  Sn § | Sd  S(   Ns   Untitleds	   Not saveds    The buffer for %s is not saved.
s   Please save it first!s   No file names   This window has no file name(   s   selfs   editwins	   get_saveds   short_titles
   long_titles   names   errorboxs   texts	   focus_sets   ios   filename(   s   selfs   names   filename(    (    s*   /mit/python/share/idlelib/ScriptBinding.pys   getfilename– s   )
c    s9   © « t  i | | d |  i i ƒ¬ |  i i i ƒ  d  S(   Ns   master(   s   tkMessageBoxs	   showerrors   titles   messages   selfs   editwins   texts	   focus_set(   s   selfs   titles   message(    (    s*   /mit/python/share/idlelib/ScriptBinding.pys   errorbox© s   (   s   keydefss   Nones   menudefss   __init__s   check_module_events   tabnannys   checksyntaxs   import_module_events   run_script_events   getfilenames   errorbox(    (    (    s*   /mit/python/share/idlelib/ScriptBinding.pys   ScriptBinding$ s   00		(   s   __doc__s   syss   oss   imps   tkMessageBoxs   indent_messages   ScriptBinding(   s   syss   imps   tkMessageBoxs   indent_messages   ScriptBindings   os(    (    s*   /mit/python/share/idlelib/ScriptBinding.pys   ? s   	