ฦ
สM๖9c       sR     d  Z  $ & d k Z ( d Z ) e i e i d Z + d f  d     YZ d S(   s#  A generic class to build line-oriented command interpreters.

Interpreters constructed with this class obey the following conventions:

1. End of file on input is processed as the command 'EOF'.
2. A command is parsed out of each line by collecting the prefix composed
   of characters in the identchars member.
3. A command `foo' is dispatched to a method 'do_foo()'; the do_ method
   is passed a single argument consisting of the remainder of the line.
4. Typing an empty line repeats the last command.  (Actually, it calls the
   method `emptyline', which may be overridden in a subclass.)
5. There is a predefined `help' method.  Given an argument `topic', it
   calls the command `help_topic'.  With no arguments, it lists all topics
   with defined help_ functions, broken into up to three topics; documented
   commands, miscellaneous help topics, and undocumented commands.
6. The command '?' is a synonym for `help'.  The command '!' is a synonym
   for `shell', if a do_shell method exists.

The `default' method may be overridden to intercept commands for which there
is no do_ method.

The data member `self.ruler' sets the character used to draw separator lines
in the help messages.  If empty, no ruler line is drawn.  It defaults to "=".

If the value of `self.intro' is nonempty when the cmdloop method is called,
it is printed out on interpreter startup.  This value may be overridden
via an optional argument to the cmdloop() method.

The data members `self.doc_header', `self.misc_header', and
`self.undoc_header' set the headers used for the help function's
listings of documented functions, miscellaneous topics, and undocumented
functions respectively.

These interpreters use raw_input; thus, if the readline module is loaded,
they automatically support Emacs-like command history and editing features.
Ns   (Cmd) s   _s   Cmdc      s๏   + , e  Z - e Z . d Z / d Z 0 g  Z 1 e Z 2 d Z	 3 d Z
 4 d Z 5 d Z 6 d Z 8 d   Z : e d  Z O d	   Z R d
   Z U d   Z X d   Z [ d   Z s d   Z w d   Z z d   Z ฐ d   Z RS(   Ns   =s    s(   Documented commands (type help <topic>):s   Miscellaneous help topics:s   Undocumented commands:s   *** No help on %sc    s
   8 8 d  S(   N(    (   s   selfs    /mit/python/lib/python2.0/cmd.pys   __init__8 s    c    s  : ; |  i   < | t j o = | |  _ n > |  i o ? |  i GHn @ t } A xฒ A | oฆ B |  i o! C |  i d } D |  i d =n< F y G t |  i  } Wn H t	 j
 o I d } n XJ |  i
 |  } K |  i |  } L |  i | |  } q[ WM |  i   d  S(   Ni    s   EOF(   s   selfs   preloops   intros   Nones   stops   cmdqueues   lines	   raw_inputs   prompts   EOFErrors   precmds   onecmds   postcmds   postloop(   s   selfs   intros   stops   lines    /mit/python/lib/python2.0/cmd.pys   cmdloop: s&   	 c    s   O P | Sd  S(   N(   s   line(   s   selfs   lines    /mit/python/lib/python2.0/cmd.pys   precmdO s   c    s   R S | Sd  S(   N(   s   stop(   s   selfs   stops   lines    /mit/python/lib/python2.0/cmd.pys   postcmdR s   c    s
   U V d  S(   N(    (   s   selfs    /mit/python/lib/python2.0/cmd.pys   preloopU s   c    s
   X Y d  S(   N(    (   s   selfs    /mit/python/lib/python2.0/cmd.pys   postloopX s   c    sฎ  [ \ t  i |  } ] | o ^ |  i   Snz _ | d d j o ` d | d } nQ a | d d j o< b t |  d  o c d | d } n e |  i |  Sn f | |  _ g d t |  f \ } } h x6 h | | j  o | | |  i j o h | d } qื Wi | |  t  i | |  f \ } } j | d j o k |  i |  SnT m y n t |  d	 |  } Wn& o t j
 o p |  i |  Sn Xq | |  Sd  S(
   Ni    s   ?s   help i   s   !s   do_shells   shell s    s   do_(   s   strings   strips   lines   selfs	   emptylines   hasattrs   defaults   lastcmds   lens   is   ns
   identcharss   cmds   args   getattrs   funcs   AttributeError(   s   selfs   lines   is   ns   cmds   args   funcs    /mit/python/lib/python2.0/cmd.pys   onecmd[ s,    $ &c    s+   s t |  i o u |  i |  i  Sn d  S(   N(   s   selfs   lastcmds   onecmd(   s   selfs    /mit/python/lib/python2.0/cmd.pys	   emptylines s   c    s   w x d G| GHd  S(   Ns   *** Unknown syntax:(   s   line(   s   selfs   lines    /mit/python/lib/python2.0/cmd.pys   defaultw s   c    sั  z { | o } y ~ t |  d |  } Wnp   y:  t |  d |  i }  | o  | GH d  Sn Wn   n X |  i | f GH d  Sn X |   n# g  }  |  i g }  x`  | oU  | d }  | i o  | t | i  } n  | t |  }  | d =qษ W g  }  g  }  h  }	  x< | d  r/ }
  |
 d  d j o  d |	 |
 d <n qPW | i    d }  xฦ | d  rน }
  |
 d  d j o   |
 | j o
 ก qจn ข |
 } ฃ |
 d } ค |	 i |  o ฅ | i |  ฆ |	 | =n; ง t |  |
  i o จ | i |  n ช | i |  n qจWซ |  i GHฌ |  i |  i | d d	  ญ |  i |  i |	 i   d d	  ฎ |  i |  i | d d	  d  S(
   Ns   help_s   do_i    i   i   s    i   i   iP   (   s   args   getattrs   selfs   funcs   __doc__s   docs   nohelps   namess	   __class__s   classess   aclasss	   __bases__s   lists   dirs   cmds_docs
   cmds_undocs   helps   names   sorts   prevnames   cmds   has_keys   appends
   doc_leaders   print_topicss
   doc_headers   misc_headers   keyss   undoc_header(   s   selfs   args   funcs   docs   namess   classess   aclasss   cmds_docs
   cmds_undocs   helps   names   prevnames   cmds    /mit/python/lib/python2.0/cmd.pys   do_helpz sb   

	 
			 		 	
	"c 	   sย   ฐ ฑ | oฑ ฒ | GHณ |  i o ด |  i t |  GHn ต t | |  \ } } ถ | } ท xP | d ท rC } ธ | d j o ธ Hn น d | d | Gบ | d | } qh Wป d GHn d  S(   Ni    s   %-s   si   s   
(   s   cmdss   headers   selfs   rulers   lens   divmods   maxcols   cmdlens   cmds_per_lines   junks   cols   cmd(	   s   selfs   headers   cmdss   cmdlens   maxcols   cmds_per_lines   junks   cols   cmds    /mit/python/lib/python2.0/cmd.pys   print_topicsฐ s   
	 	 (   s   PROMPTs   prompts
   IDENTCHARSs
   identcharss   rulers   lastcmds   cmdqueues   Nones   intros
   doc_leaders
   doc_headers   misc_headers   undoc_headers   nohelps   __init__s   cmdloops   precmds   postcmds   preloops   postloops   onecmds	   emptylines   defaults   do_helps   print_topics(    s    /mit/python/lib/python2.0/cmd.pys   Cmd+ s,   											6(   s   __doc__s   strings   PROMPTs   letterss   digitss
   IDENTCHARSs   Cmd(    s    /mit/python/lib/python2.0/cmd.pys   ?$ s   	