;
Ñâ"Ic            1   @   s*  d  d l  Z  d  d l Z  d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l	 Z	 d  d l
 Z
 d  d l m Z y d  d l TWn4 e k
 o( e d d e j ƒe j d ƒ Yn Xd  d l j Z d  d l m Z 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% d  d l" m& Z& d  d l" m' Z' d Z( y d  d l) m* Z* Wn e k
 o d Z* Yn Xe j a+ y d  d l, Z, Wn e k
 o Yn2 Xe- e- d „ Z. e. e, _/ e- e- d „ Z0 e0 e, _1 e- e
 j2 d „ Z3 e3 e
 _2 Gd „  d e ƒ Z4 Gd „  d e ƒ Z5 Gd „  d e ƒ Z6 Gd „  d e ƒ Z7 Gd  „  d! e$ j8 ƒ Z9 Gd" „  d# e ƒ Z: Gd$ „  d% e ƒ Z; Gd& „  d' e< ƒ Z= d( Z> d) „  Z? e@ d* k o e jA d* e jA d% <e? ƒ  n d S(+   i    N(   u   InteractiveInterpreter(   u   *uK   ** IDLE can't import Tkinter.  Your Python may not be configured for Tk. **u   filei   (   u   EditorWindowu   fixwordbreaks(   u   FileList(   u   ColorDelegator(   u   UndoDelegator(   u   OutputWindow(   u   idleConf(   u   idlever(   u   rpc(   u   Debugger(   u   RemoteDebugger(   u   macosxSupportu	   127.0.0.1(   u   SIGTERMi   c             C   sP   t  } y/ | j t j |  | | | d | d | ƒƒ Wn t k
 o Yn Xd  S(   Nu   fileu   line(   u   warning_streamu   writeu   warningsu   formatwarningu   IOError(   u   messageu   categoryu   filenameu   linenou   fileu   line(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   idle_showwarning7   s    c             C   sz   d } | d | | f 7} | d k o t j | | ƒ j ƒ  n | } | o | d | 7} n | d | j |  f 7} | S(   u   Format warnings the IDLE wayu!   
Warning (from warnings module):
u     File "%s", line %s
u       %s
u   %s: %s
>>> N(   u   Noneu	   linecacheu   getlineu   stripu   __name__(   u   messageu   categoryu   filenameu   linenou   fileu   lineu   s(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   idle_formatwarning@   s    ,c             C   so   t  j } i  } xE | D]= }  |  d d … |  d d … d k o | |  | |  <q q W| ƒ  | j | ƒ d S(   uv  Extend linecache.checkcache to preserve the <pyshell#...> entries

    Rather than repeating the linecache code, patch it to save the
    <pyshell#...> entries, call the original linecache.checkcache()
    (which destroys them), and then restore the saved entries.

    orig_checkcache is bound at definition time to the original
    method, allowing it to be patched.

    Ni   iÿÿÿÿu   <>(   u	   linecacheu   cacheu   update(   u   filenameu   orig_checkcacheu   cacheu   save(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   extended_linecache_checkcacheM   s    	 %c             B   s€   |  Ee  Z d  Z d „  Z d d g Z d „  Z d d „ Z d d „ Z d	 „  Z	 d
 „  Z
 d „  Z d „  Z d „  Z d „  Z d S(   u6   Regular text edit window in IDLE, supports breakpointsc             G   sÀ   g  |  _  t j |  | Œ |  j j d |  j ƒ |  j j d |  j ƒ |  j j d |  j j ƒ t	 j
 j t j ƒ  d ƒ |  _ |  j j o |  j ƒ  n |  j j |  d „ } |  j j | ƒ d  S(   Nu   <<set-breakpoint-here>>u   <<clear-breakpoint-here>>u   <<open-python-shell>>u   breakpoints.lstc             S   s   | j  ƒ  |  ƒ  d  S(   N(   u   restore_file_breaks(   u   old_hooku   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   filename_changed_hooks   s    
(   u   breakpointsu   EditorWindowu   __init__u   textu   bindu   set_breakpoint_hereu   clear_breakpoint_hereu   flistu
   open_shellu   osu   pathu   joinu   idleConfu   GetUserCfgDiru   breakpointPathu   iou   filenameu   restore_file_breaksu   filename_change_hooku   set_filename_change_hook(   u   selfu   argsu   filename_changed_hook(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   __init__h   s    	 	u   Set Breakpointu   <<set-breakpoint-here>>u   Clear Breakpointu   <<clear-breakpoint-here>>c             C   s¦   |  j  } |  j j } | j d d | d | d ƒ y |  j j | ƒ } Wn$ t k
 o |  j j | ƒ Yn Xy& |  j j	 j
 j } | j | | ƒ Wn Yn Xd  S(   Nu   BREAKu   %d.0i   (   u   textu   iou   filenameu   tag_addu   breakpointsu   indexu
   ValueErroru   appendu   flistu   pyshellu   interpu   debuggeru   set_breakpoint_here(   u   selfu   linenou   textu   filenameu   iu   debug(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   set_breakpoint|   s    	c             C   sW   |  j  } |  j j } | p | j ƒ  d  St t | j d ƒ ƒ ƒ } |  j | ƒ d  S(   Nu   insert(   u   textu   iou   filenameu   bellu   intu   floatu   indexu   set_breakpoint(   u   selfu   eventu   textu   filenameu   lineno(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   set_breakpoint_hereŠ   s    	
c             C   s­   |  j  } |  j j } | p | j ƒ  d  St t | j d ƒ ƒ ƒ } y |  j j | ƒ Wn Yn X| j	 d d d ƒ y& |  j
 j j j } | j | | ƒ Wn Yn Xd  S(   Nu   insertu   BREAKu   insert linestartu   insert lineend +1char(   u   textu   iou   filenameu   bellu   intu   floatu   indexu   breakpointsu   removeu
   tag_removeu   flistu   pyshellu   interpu   debuggeru   clear_breakpoint_here(   u   selfu   eventu   textu   filenameu   linenou   debug(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   clear_breakpoint_here“   s"    	
c             C   s‡   |  j  oy |  j } |  j j } | p | j ƒ  d  Sg  |  _  | j d d t ƒ y# |  j j j	 j
 } | j | ƒ Wqƒ Yqƒ Xn d  S(   Nu   BREAKu   1.0(   u   breakpointsu   textu   iou   filenameu   bellu
   tag_removeu   ENDu   flistu   pyshellu   interpu   debuggeru   clear_file_breaks(   u   selfu   textu   filenameu   debug(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   clear_file_breaks¦   s    
	
	c             C   sá   |  j  } |  j j } y t |  j d ƒ j ƒ  } Wn t k
 o g  } Yn Xt |  j d ƒ } x3 | D]+ } | j | d ƒ p | j | ƒ qg qg W|  j	 ƒ  |  j  } | o# | j | d t
 | ƒ d ƒ n | j ƒ  d S(   u#   Save breakpoints when file is savedu   ru   wu   =u   
N(   u   breakpointsu   iou   filenameu   openu   breakpointPathu	   readlinesu   IOErroru
   startswithu   writeu   update_breakpointsu   stru   close(   u   selfu   breaksu   filenameu   linesu   new_fileu   line(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   store_file_breaksµ   s     	 
	#c             C   sÈ   |  j  j ƒ  |  j j } | d  k o d  St j j |  j ƒ oƒ t	 |  j d ƒ j
 ƒ  } xh | D]\ } | j | d ƒ oB t | t | ƒ d d  … ƒ } x | D] } |  j | ƒ q¡ Wq` q` Wn d  S(   Nu   ru   =i   (   u   textu   updateu   iou   filenameu   Noneu   osu   pathu   isfileu   breakpointPathu   openu	   readlinesu
   startswithu   evalu   lenu   set_breakpoint(   u   selfu   filenameu   linesu   lineu   breakpoint_linenumbersu   breakpoint_linenumber(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   restore_file_breaksÜ   s       c             C   s4   |  j  } | j d ƒ } |  j | ƒ } | |  _ d S(   u3   Retrieves all the breakpoints in the current windowu   BREAKN(   u   textu
   tag_rangesu   ranges_to_linenumbersu   breakpoints(   u   selfu   textu   rangesu   linenumber_list(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   update_breakpointsé   s    	c             C   s‰   g  } x| t  d t | ƒ d ƒ D]b } t t | | ƒ ƒ } t t | | d ƒ ƒ } x) | | k  o | j | ƒ | d 7} qX Wq W| S(   Ni    i   i   (   u   rangeu   lenu   intu   floatu   append(   u   selfu   rangesu   linesu   indexu   linenou   end(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   ranges_to_linenumbersð   s      c             C   s   |  j  ƒ  t j |  ƒ d S(   u7   Extend base method - clear breaks when module is closedN(   u   clear_file_breaksu   EditorWindowu   _close(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   _close  s    
N(   u   Set Breakpointu   <<set-breakpoint-here>>(   u   Clear Breakpointu   <<clear-breakpoint-here>>(   u   __name__u
   __module__u   __doc__u   __init__u   rmenu_specsu   set_breakpointu   Noneu   set_breakpoint_hereu   clear_breakpoint_hereu   clear_file_breaksu   store_file_breaksu   restore_file_breaksu   update_breakpointsu   ranges_to_linenumbersu   _close(   u
   __locals__(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   PyShellEditorWindowe   s   
						'			u   PyShellEditorWindowc             B   s,   |  Ee  Z d  Z e Z d Z d d „ Z d S(   u8   Extend base class: IDLE supports a shell and breakpointsc             C   sW   |  j  o |  j  j j ƒ  n3 t |  ƒ |  _  |  j  o |  j  j ƒ  p d  Sn |  j  S(   N(   u   pyshellu   topu   wakeupu   PyShellu   beginu   None(   u   selfu   event(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu
   open_shell  s    

	N(   u   __name__u
   __module__u   __doc__u   PyShellEditorWindowu   EditorWindowu   Noneu   pyshellu
   open_shell(   u
   __locals__(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   PyShellFileList  s   
u   PyShellFileListc             B   s/   |  Ee  Z d  Z d „  Z d „  Z d „  Z d S(   u8   Extend base class: colorizer for the shell window itselfc             C   s   t  j |  ƒ |  j ƒ  d  S(   N(   u   ColorDelegatoru   __init__u   LoadTagDefs(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   __init__  s    c             C   s7   |  j  d d d ƒ |  j d d d ƒ t j |  ƒ d  S(   Nu   TODOu   1.0u   iomarku   SYNC(   u
   tag_removeu   tag_addu   ColorDelegatoru   recolorize_main(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   recolorize_main"  s    c             C   s„   t  j |  ƒ t j d d d ƒ } |  j j i i d  d 6d  d 6d 6t j | d ƒ d 6t j | d ƒ d 6t j | d	 ƒ d	 6ƒ d  S(
   Nu   mainu   Themeu   nameu
   backgroundu
   foregroundu   stdinu   stdoutu   stderru   console(   u   ColorDelegatoru   LoadTagDefsu   idleConfu	   GetOptionu   tagdefsu   updateu   Noneu   GetHighlight(   u   selfu   theme(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   LoadTagDefs'  s    N(   u   __name__u
   __module__u   __doc__u   __init__u   recolorize_mainu   LoadTagDefs(   u
   __locals__(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   ModifiedColorDelegator  s   
		u   ModifiedColorDelegatorc             B   s,   |  Ee  Z d  Z d d „ Z d d „ Z d S(   u;   Extend base class: forbid insert/delete before the I/O markc             C   s`   y/ |  j  j | d d ƒ o |  j  j ƒ  d  SWn t k
 o Yn Xt j |  | | | ƒ d  S(   Nu   <u   iomark(   u   delegateu   compareu   bellu   TclErroru   UndoDelegatoru   insert(   u   selfu   indexu   charsu   tags(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   insert4  s    	c          
   C   s]   y/ |  j  j | d d ƒ o |  j  j ƒ  d  SWn t k
 o Yn Xt j |  | | ƒ d  S(   Nu   <u   iomark(   u   delegateu   compareu   bellu   TclErroru   UndoDelegatoru   delete(   u   selfu   index1u   index2(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   delete=  s    	N(   u   __name__u
   __module__u   __doc__u   Noneu   insertu   delete(   u
   __locals__(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   ModifiedUndoDelegator1  s   
	u   ModifiedUndoDelegatorc             B   s   |  Ee  Z d  „  Z d S(   c             C   s
   t  ‚ d S(   u0   Override the base class - just re-raise EOFErrorN(   u   EOFError(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu
   handle_EOFI  s    N(   u   __name__u
   __module__u
   handle_EOF(   u
   __locals__(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   MyRPCClientG  s   
u   MyRPCClientc             B   s=  |  Ee  Z d  „  Z d Z d Z d Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z d „  Z d	 „  Z d
 „  Z d Z d „  Z d Z d „  Z d „  Z d „  Z d „  Z d Z d „  Z d d „ Z d „  Z d „  Z d „  Z d d „ Z d „  Z d „  Z d „  Z  d „  Z! d „  Z" d „  Z# d „  Z$ d „  Z% d S(    c             C   sQ   | |  _  t j d j } t j |  d | ƒd  |  _ d |  _	 |  j
 ƒ  |  _ d  S(   Nu   __main__u   localsF(   u	   tkconsoleu   sysu   modulesu   __dict__u   InteractiveInterpreteru   __init__u   Noneu   save_warnings_filtersu   Falseu
   restartingu   build_subprocess_arglistu   subprocess_arglist(   u   selfu	   tkconsoleu   locals(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   __init__P  s    			i"  c             C   s+   |  j  } t j t j t j | ƒ |  _ d  S(   N(   u   subprocess_arglistu   osu   spawnvu   P_NOWAITu   sysu
   executableu   rpcpid(   u   selfu   args(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   spawn_subprocess\  s    	c             C   sÄ   d „  t  j Dƒ } t j d d d d d d d ƒ} t d k o d	 | f } n d
 | f } t  j d  d … d k o! d t  j k o d t  j } n
 t  j } | g | d | t |  j	 ƒ g S(   Nc             S   s   g  } |  ] } | d  | q
 S(   u   -W(    (   u   .0u   _[1]u   s(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu
   <listcomp>a  s    u   mainu   Generalu   delete-exitfuncu   defaultu   typeu   boolu   idlelib.PyShellu&   __import__('idlelib.run').run.main(%r)u   __import__('run').main(%r)i   u   winu    u   "%s"u   -cF(
   u   sysu   warnoptionsu   idleConfu	   GetOptionu   Falseu   __name__u   platformu
   executableu   stru   port(   u   selfu   wu	   del_exitfu   commandu   decorated_exec(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   build_subprocess_arglist`  s    *	c             C   s  |  j  ƒ  t |  j f } xp t d ƒ D]T } t j | ƒ y t | ƒ |  _ PWq& t j	 k
 o } z WYd  d  } ~ Xq& Xq& W|  j
 ƒ  d  S|  j j j d ƒ y |  j j ƒ  Wn8 t j k
 o) } z |  j ƒ  d  SWYd  d  } ~ Xn X|  j j d |  j ƒ |  j j d |  j j ƒ |  j j d |  j j ƒ |  j j d |  j j ƒ |  j j d t ƒ |  j j d |  ƒ |  j ƒ  |  j ƒ  |  j S(	   Ni   i
   u   stdinu   stdoutu   stderru   flistu	   linecacheu   interp(   u   spawn_subprocessu	   LOCALHOSTu   portu   rangeu   timeu   sleepu   MyRPCClientu   rpccltu   socketu   erroru   display_port_binding_erroru   Noneu   listening_socku
   settimeoutu   acceptu   timeoutu   display_no_subprocess_erroru   registeru	   tkconsoleu   stdoutu   stderru   flistu	   linecacheu   transfer_pathu   poll_subprocess(   u   selfu   addru   iu   err(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   start_subprocessr  s6    
 



c             C   s¯  |  j  o |  j Sd
 |  _  |  j ƒ  } | o# y t j |  j ƒ WqQ YqQ Xn |  j j ƒ  |  j ƒ  |  j } | j	 } d | _	 |  j ƒ  y |  j j ƒ  Wn8 t j k
 o) } z |  j ƒ  d  SWYd  d  } ~ Xn X|  j ƒ  | j j d d ƒ | o | j d ƒ | j ƒ  n t | j ƒ d d d } | j | d | ƒ | j j d d ƒ | j j d d	 ƒ | j ƒ  | o  t j |  j ƒ } | j ƒ  n d |  _  |  j S(   Nu   iomarku   end-1cu   
i   i   u   =u	    RESTART u   restartu   leftTF(   u
   restartingu   rpccltu   Trueu   getdebuggeru   RemoteDebuggeru   close_subprocess_debuggeru   closeu   unix_terminateu	   tkconsoleu	   executingu   Falseu   spawn_subprocessu   acceptu   socketu   timeoutu   display_no_subprocess_erroru   Noneu   transfer_pathu   textu   deleteu   writeu
   showpromptu   intu   widthu   mark_setu   mark_gravityu   restart_subprocess_debuggeru   load_breakpoints(   u   selfu   debugu   consoleu   was_executingu   erru   halfbaru   gui(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   restart_subprocess“  sF    
		
			



	c             C   s   |  j  j d d d i  ƒ d  S(   Nu   execu   interrupt_the_server(    (   u   rpccltu
   remotecall(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   __request_interrupt¿  s    c             C   s   t  j d |  j ƒ j ƒ  d  S(   Nu   target(   u	   threadingu   Threadu'   _ModifiedInterpreter__request_interruptu   start(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   interrupt_subprocessÂ  s    c             C   sK   y |  j  j ƒ  Wn t k
 o Yn X|  j ƒ  d |  j _ d  |  _  d  S(   NF(   u   rpccltu   closeu   AttributeErroru   unix_terminateu   Falseu	   tkconsoleu	   executingu   None(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   kill_subprocessÅ  s    
c             C   s|   t  t d ƒ oh y t j |  j t ƒ Wn t k
 o d SYqx Xy t j |  j d ƒ Wqx t k
 o d SYqx Xn d S(   u;   UNIX: make sure subprocess is terminated and collect statusu   killNi    (   u   hasattru   osu   killu   rpcpidu   SIGTERMu   OSErroru   waitpid(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   unix_terminateÎ  s    
c             C   s   |  j  d t j f ƒ d  S(   NuR   if 1:
        import sys as _sys
        _sys.path = %r
        del _sys
        
(   u
   runcommandu   sysu   path(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   transfer_pathÜ  s    c             C   s¸  |  j  } | d  k o d  Sy | j |  j d d ƒ} Wn? t t t f k
 o* |  j j o d  Sd  } |  j	 ƒ  Yn X| o|  j j
 ƒ  d  |  _ | \ } } |  j j } | d k o+ | d  k	 o t t | ƒ d | ƒqXns | d k o% |  j j d ƒ o |  j ƒ  qXnA | d k o3 d } t | | d t j ƒt | | d | ƒn y |  j j ƒ  Wq„t k
 o Yq„Xn |  j j p# |  j j j |  j j |  j ƒ n d  S(	   Nu   waitgš™™™™™©?u   OKu   fileu	   EXCEPTIONu   <<toggle-jit-stack-viewer>>u   ERRORu/   PyShell.ModifiedInterpreter: Subprocess ERROR:
(   u   rpccltu   Noneu   pollresponseu
   active_sequ   EOFErroru   IOErroru   KeyboardInterruptu	   tkconsoleu   closingu   restart_subprocessu   resetoutputu   consoleu   printu   repru   getvaru   remote_stack_vieweru   sysu
   __stderr__u   endexecutingu   AttributeErroru   textu   afteru   pollintervalu   poll_subprocess(   u   selfu   cltu   responseu   howu   whatu   consoleu   errmsg(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   poll_subprocesså  s@    		
c             C   s   | |  _  d  S(   N(   u   debugger(   u   selfu   debugger(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   setdebugger  s    c             C   s   |  j  S(   N(   u   debugger(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   getdebugger  s    c             C   s   |  j  j j d |  j ƒ d S(   u“  Initiate the remote stack viewer from a separate thread.

        This method is called from the subprocess, and by returning from this
        method we allow the subprocess to unblock.  After a bit the shell
        requests the subprocess to open the remote stack viewer which returns a
        static object looking at the last exceptiopn.  It is queried through
        the RPC mechanism.

        i,  N(   u	   tkconsoleu   textu   afteru   remote_stack_viewer(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   open_remote_stack_viewer  s    
c             C   s	  d d l  m } |  j j d d d i  ƒ } | d  k o |  j j j ƒ  d  S| j |  j | ƒ } d d l	 m
 } m } t |  j j ƒ } t j d d d	 ƒ } t j | d
 ƒ d } | | d | d d ƒ}	 |	 j j d d d d ƒ | |	 j d  | ƒ }
 |
 j ƒ  d  S(   Ni    (   u   RemoteObjectBrowseru   execu   stackvieweru   flist(   u   ScrolledCanvasu   TreeNodeu   mainu   Themeu   nameu   normalu
   backgroundu   bgu   highlightthicknessu   expandi   u   fillu   both(   u   flist(   u   idlelibu   RemoteObjectBrowseru   rpccltu   remotequeueu   Noneu	   tkconsoleu   rootu   bellu   StubObjectTreeItemu   idlelib.TreeWidgetu   ScrolledCanvasu   TreeNodeu   Toplevelu   idleConfu	   GetOptionu   GetHighlightu   frameu   packu   canvasu   expand(   u   selfu   RemoteObjectBrowseru   oidu   itemu   ScrolledCanvasu   TreeNodeu   topu   themeu
   backgroundu   scu   node(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   remote_stack_viewer   s    i    c             C   s#   |  j  | ƒ } |  j | | ƒ d S(   u1   Like runsource() but assumes complete exec sourceN(   u   stuffsourceu   execfile(   u   selfu   sourceu   filename(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu
   execsource3  s    c          
   C   sÀ   | d k o t | d ƒ j ƒ  } n y t | | d ƒ } Wnp t t f k
 o^ |  j j ƒ  |  j j } t	 d d | ƒt	 d d | ƒt
 j |  | ƒ |  j j ƒ  Yn X|  j | ƒ d S(   u   Execute an existing fileu   ru   execu    *** Error in script or command!
u   fileu"   Traceback (most recent call last):N(   u   Noneu   openu   readu   compileu   OverflowErroru   SyntaxErroru	   tkconsoleu   resetoutputu   stderru   printu   InteractiveInterpreteru   showsyntaxerroru
   showpromptu   runcode(   u   selfu   filenameu   sourceu   codeu   tkerr(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   execfile8  s    c             C   s–   |  j  | ƒ } d |  _ t j d d … |  _ t j d d d t ƒ z t j |  | | ƒ SWd |  j d k	 o# |  j t j d d … <d |  _ n Xd S(   uB   Extend base class method: Stuff the source in the line cache firsti    Nu   actionu   erroru   category(
   u   stuffsourceu   moreu   warningsu   filtersu   save_warnings_filtersu   filterwarningsu   SyntaxWarningu   InteractiveInterpreteru	   runsourceu   None(   u   selfu   sourceu   filename(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu	   runsourceH  s    	c             C   sS   d |  j  } |  j  d |  _  | j d ƒ } t | ƒ d d | | f t j | <| S(   u"   Stuff source in the filename cacheu   <pyshell#%d>i   u   
i    (   u   gidu   splitu   lenu	   linecacheu   cache(   u   selfu   sourceu   filenameu   lines(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   stuffsourcea  s
    #c             C   s   |  j  d | f ƒ d S(   u>   Prepend sys.path with file's directory if not already includedu(  if 1:
            _filename = %r
            import sys as _sys
            from os.path import dirname as _dirname
            _dir = _dirname(_filename)
            if not _dir in _sys.path:
                _sys.path.insert(0, _dir)
            del _filename, _sys, _dirname, _dir
            
N(   u
   runcommand(   u   selfu   filename(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   prepend_syspathi  s    c             C   sõ   |  j  } | j } | j d d d ƒ t j ƒ  \ } } } | j p d } | j p d } | j p d }	 |	 d k o | d 7} n | d k o d |	 d }
 n d | d |	 d f }
 | j | |
 ƒ | j	 ƒ  |  j
 d	 | ƒ | j ƒ  d
 S(   u§   Override Interactive Interpreter method: Use Colorizing

        Color the offending position instead of printing it and pointing at it
        with a caret.

        u   ERRORu   1.0u   endu   <no detail available>i   i    u   iomark + %d charsu&   iomark linestart + %d lines + %d charsu   SyntaxError: %s
N(   u	   tkconsoleu   textu
   tag_removeu   sysu   exc_infou   msgu   linenou   offsetu   colorize_syntax_erroru   resetoutputu   writeu
   showprompt(   u   selfu   filenameu	   tkconsoleu   textu   typeu   valueu   tbu   msgu   linenou   offsetu   pos(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   showsyntaxerroru  s"    		
c             C   sL   |  j  j ƒ  |  j ƒ  t j |  ƒ |  j  j d ƒ o |  j  j ƒ  n d S(   u1   Extend base class method to reset output properlyu   <<toggle-jit-stack-viewer>>N(   u	   tkconsoleu   resetoutputu   checklinecacheu   InteractiveInterpreteru   showtracebacku   getvaru   open_stack_viewer(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   showtraceback  s
    
c             C   sZ   t  j } xJ t | j ƒ  ƒ D]6 } | d  d … | d d  … d k o | | =q q Wd  S(   Ni   iÿÿÿÿu   <>(   u	   linecacheu   cacheu   listu   keys(   u   selfu   cu   key(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   checklinecache—  s
    	 %c             C   sZ   |  j  j o |  j ƒ  d S|  j o  |  j j d d | f i  ƒ n t | |  j ƒ d S(   u*   Run the code without invoking the debuggeri    u   execu   runcodei   (   u	   tkconsoleu	   executingu   display_executing_dialogu   rpccltu   remotequeueu   execu   locals(   u   selfu   code(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu
   runcommand  s    

 c             C   sü  |  j  j o |  j j ƒ  n |  j ƒ  |  j d k	 o# |  j t j d d … <d |  _ n |  j	 } z]y| |  j  j
 ƒ  | o5 |  j d k	 o% |  j j d d | f i  ƒ |  _ n/ | o | j | |  j ƒ n t | |  j ƒ WnÚ t k
 oR |  j  j p: t j d d d d d |  j  j ƒo ‚  q>|  j ƒ  n ‚  Yn~ t o1 t d	 d
 |  j  j ƒ|  j ƒ  |  j  j ƒ  n> |  j  j o& d |  j  _ t d d
 |  j  j ƒn |  j ƒ  Yn XWd t p, y |  j  j ƒ  Wq÷t k
 o Yq÷Xn Xd S(   u   Override base class methodNu   execu   runcodeu   Exit?u   Do you want to exit altogether?u   defaultu   yesu   masteru    IDLE internal error in runcode()u   fileu   KeyboardInterruptF(   u	   tkconsoleu	   executingu   interpu   restart_subprocessu   checklinecacheu   save_warnings_filtersu   Noneu   warningsu   filtersu   debuggeru   beginexecutingu   rpccltu
   asyncqueueu
   active_sequ   runu   localsu   execu
   SystemExitu   closingu   tkMessageBoxu   askyesnou   textu   showtracebacku   use_subprocessu   printu   stderru   endexecutingu   canceledu   Falseu   AttributeError(   u   selfu   codeu   debugger(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   runcode©  sR    
	 	
c             C   s   |  j  j j | ƒ d S(   u   Override base class methodN(   u	   tkconsoleu   stderru   write(   u   selfu   s(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   writeÚ  s    c             C   s    t  j d d d |  j j ƒd  S(   Nu   Port Binding Errorug  IDLE can't bind TCP/IP port 8833, which is necessary to communicate with its Python execution server.  Either no networking is installed on this computer or another process (another IDLE?) is using the port.  Run IDLE with the -n command line switch to start without a subprocess and refer to Help/IDLE Help 'Running without a subprocess' for further details.u   master(   u   tkMessageBoxu	   showerroru	   tkconsoleu   text(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   display_port_binding_errorÞ  s    c             C   s    t  j d d d |  j j ƒd  S(   Nu   Subprocess Startup Erroru‰   IDLE's subprocess didn't make connection.  Either IDLE can't start a subprocess or personal firewall software is blocking the connection.u   master(   u   tkMessageBoxu	   showerroru	   tkconsoleu   text(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   display_no_subprocess_errorê  s    c             C   s    t  j d d d |  j j ƒd  S(   Nu   Already executinguY   The Python Shell window is already executing a command; please wait until it is finished.u   master(   u   tkMessageBoxu	   showerroru	   tkconsoleu   text(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   display_executing_dialogò  s    N(&   u   __name__u
   __module__u   __init__u   portu   Noneu   rpccltu   rpcpidu   spawn_subprocessu   build_subprocess_arglistu   start_subprocessu   restart_subprocessu'   _ModifiedInterpreter__request_interruptu   interrupt_subprocessu   kill_subprocessu   unix_terminateu   transfer_pathu
   active_sequ   poll_subprocessu   debuggeru   setdebuggeru   getdebuggeru   open_remote_stack_vieweru   remote_stack_vieweru   gidu
   execsourceu   execfileu	   runsourceu   stuffsourceu   prepend_syspathu   showsyntaxerroru   showtracebacku   checklinecacheu
   runcommandu   runcodeu   writeu   display_port_binding_erroru   display_no_subprocess_erroru   display_executing_dialog(   u
   __locals__(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   ModifiedInterpreterN  sF   
				!	,							&												1			u   ModifiedInterpreterc             B   sÃ  |  Ee  Z d  Z e Z e Z d4 d5 d6 d7 d8 d9 g Z e j	 ƒ  o e d =d: e d <n d d l
 m Z d3 d „ Z d „  Z d; Z d; Z d; Z d; Z d; Z d „  Z d „  Z d3 d „ Z d „  Z d3 d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z  d  „  Z! d! „  Z" d" Z# d# Z$ d$ „  Z% d% „  Z& d& „  Z' d3 d' „ Z( d( „  Z) d) „  Z* d* „  Z+ d+ „  Z, d, „  Z- d3 d- „ Z. d3 d. „ Z/ d3 d/ „ Z0 d0 „  Z1 d1 „  Z2 d< d2 „ Z3 d3 S(=   u   Python Shellu   fileu   _Fileu   editu   _Editu   debugu   _Debugu   optionsu   _Optionsu   windowsu   _Windowsu   helpu   _Helpiýÿÿÿu   _Windowiþÿÿÿi    (   u   Historyc          
   C   s©  t  o6 |  j } | d d d k o | j d d ƒ q= n t |  ƒ |  _ | d  k o- t ƒ  } t | ƒ | j ƒ  t	 | ƒ } n t
 j |  | d  d  ƒ d |  _ d |  _ d |  _ |  j } | j d d ƒ | j d |  j ƒ | j d	 |  j ƒ | j d
 |  j ƒ | j d |  j ƒ | j d |  j ƒ | j d |  j ƒ | j d |  j ƒ |  j ƒ  |  _ } |  j j | ƒ t  o* | j d |  j ƒ | j d |  j ƒ n t  j! |  _" t  j# |  _$ t  j% |  _& d d l' m( } t) |  d | j* ƒ |  _! t) |  d | j* ƒ |  _# t) |  d | j* ƒ |  _+ t  p% |  j! t  _! |  j# t  _# |  t  _% n y d d  l, } | j- | _. Wn t  j/ t  _# ‚  Yn X|  j0 |  j ƒ |  _1 d |  _2 d  S(   Ni   i    u   shellu   She_lli   u   wrapu   charu   <<newline-and-indent>>u   <<plain-newline-and-indent>>u   <<interrupt-execution>>u   <<end-of-file>>u   <<open-stack-viewer>>u   <<toggle-debugger>>u   <<toggle-jit-stack-viewer>>u   <<view-restart>>u   <<restart-shell>>(   u	   IOBindingu   stdoutu   stderru   consolei2   (   u   shellu   She_llT(3   u   use_subprocessu
   menu_specsu   insertu   ModifiedInterpreteru   interpu   Noneu   Tku   fixwordbreaksu   withdrawu   PyShellFileListu   OutputWindowu   __init__u   Trueu   usetabsu   indentwidthu   context_use_ps1u   textu	   configureu   bindu   enter_callbacku   linefeed_callbacku   cancel_callbacku   eof_callbacku   open_stack_vieweru   toggle_debuggeru   toggle_jit_stack_vieweru   ColorDelegatoru   coloru   peru   insertfilteru   view_restart_marku   restart_shellu   sysu   stdoutu   save_stdoutu   stderru   save_stderru   stdinu
   save_stdinu   idlelibu	   IOBindingu
   PseudoFileu   encodingu   consoleu   pydocu
   plainpageru   pageru
   __stderr__u   Historyu   historyu   pollinterval(   u   selfu   flistu   msu   rootu   textu   coloru	   IOBindingu   pydoc(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   __init__  s^    		

				c             C   s   t  j d d ƒ S(   Nu
   shell_onlyT(   u   idleConfu   GetExtensionsu   True(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   get_standard_extension_namesO  s    c             C   s
   | a  d  S(   N(   u   warning_stream(   u   selfu   stream(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   set_warning_streamX  s    c             C   s   t  S(   N(   u   warning_stream(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   get_warning_stream\  s    c             C   sd   |  j  o( t j d d d |  j ƒ|  j ƒ  d S|  j j ƒ  } | o |  j ƒ  n |  j ƒ  d  S(   Nu   Don't debug nowu*   You can only toggle the debugger when idleu   masteru   break(	   u	   executingu   tkMessageBoxu	   showerroru   textu   set_debugger_indicatoru   interpu   getdebuggeru   close_debuggeru   open_debugger(   u   selfu   eventu   db(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   toggle_debugger_  s    
	

c             C   s%   |  j  j ƒ  } |  j d | ƒ d  S(   Nu   <<toggle-debugger>>(   u   interpu   getdebuggeru   setvar(   u   selfu   db(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   set_debugger_indicatorm  s    c             C   s   d  S(   N(    (   u   selfu   event(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   toggle_jit_stack_viewerq  s    c             C   s“   |  j  j ƒ  } | oo |  j  j d  ƒ | j ƒ  |  j  j o t j |  j  j ƒ n |  j ƒ  |  j	 j
 d ƒ d t _ |  j ƒ  n |  j ƒ  d  S(   Nu   [DEBUG OFF]
u   >>> (   u   interpu   getdebuggeru   setdebuggeru   Noneu   closeu   rpccltu   RemoteDebuggeru   close_remote_debuggeru   resetoutputu   consoleu   writeu   sysu   ps1u
   showpromptu   set_debugger_indicator(   u   selfu   db(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   close_debuggert  s    

	c             C   ss   |  j  j o t j |  j  j |  ƒ } n t j |  ƒ } |  j  j | ƒ | j ƒ  d t _ |  j	 ƒ  |  j
 ƒ  d  S(   Nu   [DEBUG ON]
>>> (   u   interpu   rpccltu   RemoteDebuggeru   start_remote_debuggeru   Debuggeru   setdebuggeru   load_breakpointsu   sysu   ps1u
   showpromptu   set_debugger_indicator(   u   selfu   dbg_gui(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   open_debugger  s    
	
c             C   s   |  j  ƒ  d |  _ d S(   u   Helper for ModifiedInterpreteri   N(   u   resetoutputu	   executing(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   beginexecuting  s    
c             C   s    d |  _  d |  _ |  j ƒ  d S(   u   Helper for ModifiedInterpreteri    N(   u	   executingu   canceledu
   showprompt(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   endexecuting’  s    		c             C   s   |  j  o7 t j d d d d d |  j ƒ} | d	 k o d Sn |  j o |  j j ƒ  n d
 |  _	 d
 |  _
 |  j j d |  j |  j ƒ d S(   u   Extend EditorWindow.close()u   Kill?u6   The program is still running!
 Do you want to kill it?u   defaultu   oku   parentu   canceli   NFT(   u	   executingu   tkMessageBoxu   askokcancelu   textu   Falseu   readingu   topu   quitu   Trueu   canceledu   closingu   afteru   pollintervalu   close2(   u   selfu   response(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   close˜  s    
	
		c             C   s   t  j |  ƒ S(   N(   u   EditorWindowu   close(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   close2©  s    c             C   s~   |  j  ƒ  t o |  j j ƒ  n |  j t _ |  j t _ |  j	 t _
 d |  _ d |  _ d |  j _ d |  _ t j |  ƒ d S(   uE   Extend EditorWindow._close(), shut down debugger and execution serverN(   u   close_debuggeru   use_subprocessu   interpu   kill_subprocessu   save_stdoutu   sysu   stdoutu   save_stderru   stderru
   save_stdinu   stdinu   Noneu   consoleu   flistu   pyshellu   historyu   EditorWindowu   _close(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   _close¬  s    
			c             C   s   d S(   u8   Override EditorWindow method: never remove the colorizerT(   u   True(   u   selfu   filename(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   ispythonsource¼  s    c             C   s   |  j  S(   N(   u   shell_title(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   short_titleÀ  s    u@   Type "copyright", "credits" or "license()" for more information.u˜  
    ****************************************************************
    Personal firewall software may warn about the connection IDLE
    makes to its subprocess using this computer's internal loopback
    interface.  This connection is not visible on any external
    interface and no data is sent to or received from the Internet.
    ****************************************************************
    c             C   s®   |  j  j d d ƒ |  j ƒ  t o/ d } |  j j ƒ  } | p |  j ƒ  d Sn d } |  j d t	 j
 t	 j |  j |  j t j | f ƒ |  j ƒ  d d  l } d  | _ d S(	   Nu   iomarku   insertu    u   ==== No Subprocess ====u&   Python %s on %s
%s
%s
IDLE %s      %s
i    FT(   u   textu   mark_setu   resetoutputu   use_subprocessu   interpu   start_subprocessu   closeu   Falseu   writeu   sysu   versionu   platformu	   COPYRIGHTu   firewallmessageu   idleveru   IDLE_VERSIONu
   showpromptu   tkinteru   Noneu   _default_rootu   True(   u   selfu   nosubu   clientu   tkinter(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   beginÏ  s     

		
	c          	   C   sµ   |  j  } z d |  _  |  j j ƒ  Wd  | |  _  X|  j j d d ƒ } t | ƒ d k o
 d } n |  j ƒ  |  j o d |  _ t p
 t	 ‚ q” n |  j
 o d |  _
 d } n | S(   Ni   u   iomarku   end-1ci    u   
u    (   u   readingu   topu   mainloopu   textu   getu   lenu   resetoutputu   canceledu   use_subprocessu   KeyboardInterruptu	   endoffile(   u   selfu   saveu   line(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   readlineâ  s"    		



	
	
c             C   s   d S(   NT(   u   True(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   isattyö  s    c          
   C   sä   y" |  j  j d d d ƒ o d  SWn Yn X|  j p |  j p) |  j ƒ  |  j j d ƒ |  j ƒ  d Sd |  _ d |  _	 |  j o? |  j j
 o2 |  j j ƒ  o |  j j ƒ  qÅ |  j j ƒ  n |  j o |  j j ƒ  n d S(   Nu	   sel.firstu   !=u   sel.lastu   KeyboardInterrupt
u   breaki    i   (   u   textu   compareu	   executingu   readingu   resetoutputu   interpu   writeu
   showpromptu	   endoffileu   canceledu   rpccltu   getdebuggeru   restart_subprocessu   interrupt_subprocessu   topu   quit(   u   selfu   event(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   cancel_callbackù  s&    	

		
c             C   s–   |  j  o |  j o d  S|  j j d d d ƒ o |  j j d d d ƒ p d  S|  j  p |  j ƒ  |  j ƒ  n  d |  _ d |  _ |  j j	 ƒ  d S(   Nu   iomarku   ==u   insertu   end-1ci    i   u   break(
   u	   executingu   readingu   textu   compareu   resetoutputu   closeu   canceledu	   endoffileu   topu   quit(   u   selfu   event(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   eof_callback  s    

		c             C   sB   |  j  o' |  j j d d ƒ |  j j d ƒ n |  j | ƒ d S(   Nu   insertu   
u   break(   u   readingu   textu   insertu   seeu   newline_and_indent_event(   u   selfu   event(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   linefeed_callback  s
    
c             C   s  |  j  o |  j o d  SyR |  j j d d ƒ } | o2 |  j j d d d ƒ o |  j | | ƒ d Sn Wn Yn X|  j j d d d ƒ oN|  j j d	 d ƒ } | oI |  j j d d | d
 ƒ o, |  j |  j j | d | d
 ƒ | ƒ d S|  j j d	 d ƒ } | oI |  j j d d | d ƒ o, |  j |  j j | d | d
 ƒ | ƒ d S|  j j d d ƒ } | oD |  j j | d d d ƒ o' |  j |  j j | d
 d ƒ | ƒ n  |  j |  j j d d ƒ | ƒ d S|  j j d d d ƒ o |  j j d d ƒ n |  j j d d ƒ } | o% | j	 ƒ  o |  j j
 d d ƒ n |  j j d d d ƒ o |  j | ƒ d S|  j j d d ƒ |  j o' |  j j d d ƒ |  j j d ƒ n |  j | ƒ |  j j d	 d d ƒ |  j j ƒ  |  j o |  j j ƒ  n |  j ƒ  d S(   Nu	   sel.firstu   sel.lastu   <=u   iomarku   breaku   insertu   <u   iomark linestartu   stdini   i    u   insert lineendu   >=u   consoleu   insert linestartu   end-1cu   end-1c linestartu   
(   u	   executingu   readingu   textu   getu   compareu   recallu   tag_prevrangeu   tag_nextrangeu   mark_setu   stripu   deleteu   newline_and_indent_eventu   insertu   seeu   tag_addu   update_idletasksu   topu   quitu   runit(   u   selfu   eventu   selu   prevu   nextu   indicesu   s(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   enter_callback'  sX    $'$''


c             C   s½  t  j d d | ƒ } t  j d d | ƒ } | j d ƒ } |  j j ƒ  zR|  j j d d d ƒ |  j j d d	 ƒ |  j j d
 d ƒ } | j ƒ  j	 d ƒ o& |  j
 | ƒ |  j j d
 d ƒ } n |  j j d | d j ƒ  ƒ t | ƒ d k o¤ t  j d | d ƒ j d ƒ } t  j d | ƒ j d ƒ } xg | d d  … D]Q } | j | ƒ o | | t | ƒ d  … } n |  j j d d | j ƒ  ƒ q>Wn Wd  |  j j d ƒ |  j j ƒ  Xd  S(   Nu   ^\s*\nu    u   \n\s*$u   
u   selu   1.0u   endu   insertu   end-1cu   insert linestartu   :i    i   u	   ^([ \t]*)(   u   reu   subu   splitu   textu   undo_block_startu
   tag_removeu   mark_setu   getu   rstripu   endswithu   newline_and_indent_eventu   insertu   stripu   lenu   searchu   groupu
   startswithu   seeu   undo_block_stop(   u   selfu   su   eventu   linesu   prefixu   orig_base_indentu   new_base_indentu   line(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   recallf  s,     )c             C   sß   |  j  j d d ƒ } t | ƒ } x1 | d k o# | | d d k o | d } q$ W| d k o# | | d d k o | d } n x1 | d k o# | | d d k o | d } qˆ W| d  | … } |  j j | ƒ } d  S(   Nu   iomarku   end-1ci    i   u    	u   
(   u   textu   getu   lenu   interpu	   runsource(   u   selfu   lineu   iu   more(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   runit€  s     "" "c          
   C   sw   |  j  j o |  j  j ƒ  Sy t j Wn% t j d d d |  j ƒd  SYn Xd d l m	 } | |  j
 |  j ƒ } d  S(   Nu   No stack traceu@   There is no stack trace yet.
(sys.last_traceback is not defined)u   masteri    (   u   StackBrowser(   u   interpu   rpccltu   remote_stack_vieweru   sysu   last_tracebacku   tkMessageBoxu	   showerroru   textu   idlelib.StackVieweru   StackBrowseru   rootu   flist(   u   selfu   eventu   StackBrowseru   sv(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   open_stack_viewerŽ  s    	
	c             C   s$   |  j  j d ƒ |  j  j d ƒ d  S(   Nu   iomarku   restart(   u   textu   see(   u   selfu   event(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   view_restart_markœ  s    c             C   s   |  j  j ƒ  d  S(   N(   u   interpu   restart_subprocess(   u   selfu   event(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   restart_shell   s    c          	   C   sl   |  j  ƒ  y t t j ƒ } Wn d } Yn X|  j j | ƒ |  j j d d ƒ |  j ƒ  |  j	 j
 ƒ  d  S(   Nu    u   insertu   end-1c(   u   resetoutputu   stru   sysu   ps1u   consoleu   writeu   textu   mark_setu   set_line_and_columnu   iou
   reset_undo(   u   selfu   s(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu
   showprompt£  s    

c             C   s„   |  j  j d d ƒ } |  j o |  j j | ƒ n |  j  j d ƒ d k o |  j  j d d ƒ n |  j  j d d ƒ |  j ƒ  d  S(   Nu   iomarku   end-1cu   end-2cu   
(   u   textu   getu   historyu   history_storeu   insertu   mark_setu   set_line_and_column(   u   selfu   source(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   resetoutput®  s    
c             C   sz   y@ |  j  j d d ƒ t j |  | | d ƒ |  j  j d d ƒ Wn ‚  Yn X|  j o d |  _ t p
 t ‚ qv n d  S(   Nu   iomarku   rightu   lefti    (   u   textu   mark_gravityu   OutputWindowu   writeu   canceledu   use_subprocessu   KeyboardInterrupt(   u   selfu   su   tags(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   write·  s    
	N(   u   fileu   _File(   u   editu   _Edit(   u   debugu   _Debug(   u   optionsu   _Options(   u   windowsu   _Windows(   u   helpu   _Help(   u   windowsu   _WindowF(    (4   u   __name__u
   __module__u   shell_titleu   ModifiedColorDelegatoru   ColorDelegatoru   ModifiedUndoDelegatoru   UndoDelegatoru
   menu_specsu   macosxSupportu   runningAsOSXAppu   idlelib.IdleHistoryu   Historyu   Noneu   __init__u   get_standard_extension_namesu   Falseu   readingu	   executingu   canceledu	   endoffileu   closingu   set_warning_streamu   get_warning_streamu   toggle_debuggeru   set_debugger_indicatoru   toggle_jit_stack_vieweru   close_debuggeru   open_debuggeru   beginexecutingu   endexecutingu   closeu   close2u   _closeu   ispythonsourceu   short_titleu	   COPYRIGHTu   firewallmessageu   beginu   readlineu   isattyu   cancel_callbacku   eof_callbacku   linefeed_callbacku   enter_callbacku   recallu   runitu   open_stack_vieweru   view_restart_marku   restart_shellu
   showpromptu   resetoutputu   write(   u
   __locals__(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   PyShellú  sf   
	;																					?					u   PyShellc             B   s>   |  Ee  Z d d  „ Z d „  Z d „  Z d „  Z d „  Z d S(   c             C   s   | |  _  | |  _ | |  _ d  S(   N(   u   shellu   tagsu   encoding(   u   selfu   shellu   tagsu   encoding(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   __init__Æ  s    		c             C   s   |  j  j | |  j ƒ d  S(   N(   u   shellu   writeu   tags(   u   selfu   s(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   writeË  s    c             C   s"   x | D] } |  j  | ƒ q Wd  S(   N(   u   write(   u   selfu   linesu   line(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu
   writelinesÎ  s     c             C   s   d  S(   N(    (   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   flushÒ  s    c             C   s   d S(   NT(   u   True(   u   self(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   isattyÕ  s    N(   u   __name__u
   __module__u   Noneu   __init__u   writeu
   writelinesu   flushu   isatty(   u
   __locals__(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu
   PseudoFileÄ  s
   
			u
   PseudoFileu‰  
USAGE: idle  [-deins] [-t title] [file]*
       idle  [-dns] [-t title] (-c cmd | -r file) [arg]*
       idle  [-dns] [-t title] - [arg]*

  -h         print this help message and exit
  -n         run IDLE without a subprocess (see Help/IDLE Help for details)

The following options will override the IDLE 'settings' configuration:

  -e         open an edit window
  -i         open a shell window

The following options imply -i and will open a shell:

  -c cmd     run the command in a shell, or
  -r file    run script from file

  -d         enable the debugger
  -s         run $IDLESTARTUP or $PYTHONSTARTUP before anything else
  -t title   set title of shell window

A default edit window will be bypassed when -c, -r, or - are used.

[arg]* are passed to the command (-c) or script (-r) in sys.argv[1:].

Examples:

idle
        Open an edit window or shell depending on IDLE's configuration.

idle foo.py foobar.py
        Edit the files, also open a shell if configured to start with shell.

idle -est "Baz" foo.py
        Run $IDLESTARTUP or $PYTHONSTARTUP, edit foo.py, and open a shell
        window with the title "Baz".

idle -c "import sys; print(sys.argv)" "foo"
        Open a shell window and run the command, passing "-c" in sys.argv[0]
        and "foo" in sys.argv[1].

idle -d -s -r foo.py "Hello World"
        Open a shell window, run a startup script, enable the debugger, and
        run foo.py, passing "foo.py" in sys.argv[0] and "Hello World" in
        sys.argv[1].

echo "import sys; print(sys.argv)" | idle - "foobar"
        Open a shell window, run the script piped in, passing '' in sys.argv[0]
        and "foobar" in sys.argv[1].
c              C   s¸  d a d }  d } d } d  } d  } d } y) t j t j d d  … d ƒ \ } } Wna t j k
 oR } z< t j j	 d t
 | ƒ ƒ t j j	 t ƒ t j d ƒ WYd  d  } ~ Xn XxF| D]>\ }	 }
 |	 d k o |
 } d }  n |	 d k o d } d }  n |	 d k o
 d } n |	 d k o t j j	 t ƒ t j ƒ  n |	 d	 k o
 d }  n |	 d
 k o
 d a n |	 d k o> |
 } t j j | ƒ o n t d | ƒ t j ƒ  d }  n |	 d k o d } d }  n |	 d k o |
 t _ d }  q¾ q¾ W| o* | d d k o t j j ƒ  } d }  n x= t t t j ƒ ƒ D]& } t j j t j | ƒ t j | <qGW| o/ | d d k o d g | d d  … t _ nõ | o d g | t _ nÚ | o | g | t _ n¿ | o„ d } g  } x' | D] } | j t j j | ƒ ƒ q÷Wx~ | D]? } t j j | ƒ } | t j k o t j j d | ƒ q!q!Wn4 t j ƒ  } | t j k o t j j d | ƒ n t j d d d d d ƒ} | p | } |  p | }  t d d ƒ a  t! t  ƒ t  j" ƒ  t# t  ƒ a$ t% j& t  t$ ƒ | oI | p | p7 x | D] } t$ j' | ƒ q,W| p t$ j( ƒ  q\q`n |  oD t$ j) ƒ  } | p d  St% j* ƒ  o t$ j+ o | j, j- ƒ  q«n t$ j. } | o | j/ ƒ  n | oW t j0 j1 d ƒ p t j0 j1 d ƒ } | o' t j j | ƒ o | j2 j3 | ƒ q'n | o | p | od | j2 j4 d t j f ƒ | o | j2 j5 | ƒ q | o$ | j2 j6 | ƒ | j2 j3 | ƒ q n t  j7 ƒ  t  j8 ƒ  d  S(   Ni   u   c:deihnr:st:u
   Error: %s
i   u   -cu   -du   -eu   -hu   -iu   -nu   -ru   No script file: u   -su   -ti    u   -u    u   mainu   Generalu   editor-on-startupu   typeu   boolu	   classNameu   Idleu   IDLESTARTUPu   PYTHONSTARTUPub   if 1:
            import sys as _sys
            _sys.argv = %r
            del _sys
            
TF(9   u   Trueu   use_subprocessu   Falseu   Noneu   getoptu   sysu   argvu   erroru   stderru   writeu   stru	   usage_msgu   exitu   stdoutu   osu   pathu   isfileu   printu   PyShellu   shell_titleu   stdinu   readu   rangeu   lenu   abspathu   appendu   dirnameu   insertu   getcwdu   idleConfu	   GetOptionu   Tku   rootu   fixwordbreaksu   withdrawu   PyShellFileListu   flistu   macosxSupportu   setupAppu   openu   newu
   open_shellu   runningAsOSXAppu   dictu   topu   loweru   pyshellu   open_debuggeru   environu   getu   interpu   execfileu
   runcommandu
   execsourceu   prepend_syspathu   mainloopu   destroy(   u   enable_shellu   enable_editu   debugu   cmdu   scriptu   startupu   optsu   argsu   msgu   ou   au   iu   pathxu   filenameu   diru
   edit_startu   shell(    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   main  sÚ    )! 







	
 $  

 		
u   __main__(B   u   osu   os.pathu   sysu   getoptu   reu   socketu   timeu	   threadingu	   tracebacku   typesu	   linecacheu   codeu   InteractiveInterpreteru   tkinteru   ImportErroru   printu
   __stderr__u   exitu   tkinter.messageboxu
   messageboxu   tkMessageBoxu   idlelib.EditorWindowu   EditorWindowu   fixwordbreaksu   idlelib.FileListu   FileListu   idlelib.ColorDelegatoru   ColorDelegatoru   idlelib.UndoDelegatoru   UndoDelegatoru   idlelib.OutputWindowu   OutputWindowu   idlelib.configHandleru   idleConfu   idlelibu   idleveru   rpcu   Debuggeru   RemoteDebuggeru   macosxSupportu	   LOCALHOSTu   signalu   SIGTERMu   warning_streamu   warningsu   Noneu   idle_showwarningu   showwarningu   idle_formatwarningu   formatwarningu
   checkcacheu   extended_linecache_checkcacheu   PyShellEditorWindowu   PyShellFileListu   ModifiedColorDelegatoru   ModifiedUndoDelegatoru	   RPCClientu   MyRPCClientu   ModifiedInterpreteru   PyShellu   objectu
   PseudoFileu	   usage_msgu   mainu   __name__u   modules(    (    (    u,   /mit/python/lib/python3.0/idlelib/PyShell.pyu   <module>   sz   	
		
		¢ÿ ­ÿ ËH	~