™N
éu¦9c       sÑ     d  Z  # % k l l l ' y ( k l Wn  ) e j
 o * k l n X- e d „ Z	 3 d „  Z
 8 d „  Z = d „  Z B d „  Z G d f  d „  ƒ  YZ ¼ e d	 d „ Z ð d
 f  d „  ƒ  YZ d S(   s/  Support to pretty-print lists, tuples, & dictionaries recursively.

Very simple, but useful, especially in debugging data structures.

Classes
-------

PrettyPrinter()
    Handle pretty-printing operations onto a stream using a configured
    set of formatting parameters.

Functions
---------

pformat()
    Format a Python object into a pretty-printed representation.

pprint()
    Pretty-print a Python object to a stream [default is sys.sydout].

saferepr()
    Generate a 'standard' repr()-like value, but protect against recursive
    data structures.

c    s,   - . / t  d | ƒ } 0 | i |  ƒ d S(   sA   Pretty-print a Python object to a stream [default is sys.sydout].s   streamN(   s   PrettyPrinters   streams   printers   pprints   object(   s   objects   streams   printers*   /usr/lib/python1.5/site-packages/pprint.pys   pprint- s   c    s   3 4 5 t  ƒ  i |  ƒ Sd S(   s<   Format a Python object into a pretty-printed representation.N(   s   PrettyPrinters   pformats   object(   s   objects*   /usr/lib/python1.5/site-packages/pprint.pys   pformat3 s   c    s   8 9 : t  ƒ  i |  ƒ Sd S(   s4   Determine if saferepr(object) is readable by eval().N(   s   PrettyPrinters
   isreadables   object(   s   objects*   /usr/lib/python1.5/site-packages/pprint.pys
   isreadable8 s   c    s   = > ? t  ƒ  i |  ƒ Sd S(   s8   Determine if object requires a recursive representation.N(   s   PrettyPrinters   isrecursives   object(   s   objects*   /usr/lib/python1.5/site-packages/pprint.pys   isrecursive= s   c    s   B C D t  |  h  ƒ d Sd S(   s=   Version of repr() which can handle recursive data structures.i    N(   s
   _safe_reprs   object(   s   objects*   /usr/lib/python1.5/site-packages/pprint.pys   safereprB s   s   PrettyPrinterc      se   G H d d e  e  d „ Z h d „  Z k d „  Z p d „  Z u d „  Z { d „  Z µ d	 „  Z RS(
   Nc    sÝ   H Y Z t  | ƒ } [ t  | ƒ } \ t o | d j p t ‚ ] t o | p
 | d j p
 t d ‚ ^ t o | p t ‚ _ | |  _ ` | |  _ a | |  _	 b | o c | |  _ n e k } f | i |  _ d S(   sò  Handle pretty printing operations onto a stream using a set of
        configured parameters.

        indent
            Number of spaces to indent for each level of nesting.

        width
            Attempted maximum number of columns in the output.

        depth
            The maximum depth to print out nested structures.

        stream
            The desired output stream.  If omitted (or false), the standard
            output stream available at construction will be used.

        i    s   depth may not be negativeN(   s   ints   indents   widths	   __debug__s   AssertionErrors   depths   selfs   _PrettyPrinter__depths    _PrettyPrinter__indent_per_levels   _PrettyPrinter__widths   streams   _PrettyPrinter__streams   syss   stdout(   s   selfs   indents   widths   depths   streams   syss*   /usr/lib/python1.5/site-packages/pprint.pys   __init__H s   )
	i   iP   c    s'   h i |  i i |  i | ƒ d ƒ d  S(   Ns   
(   s   selfs   _PrettyPrinter__streams   writes   pformats   object(   s   selfs   objects*   /usr/lib/python1.5/site-packages/pprint.pys   pprinth s   c    s?   k l t  ƒ  } m |  i | | d d h  d ƒ n | i ƒ  Sd  S(   Ni    (   s   StringIOs   sios   selfs   _PrettyPrinter__formats   objects   getvalue(   s   selfs   objects   sios*   /usr/lib/python1.5/site-packages/pprint.pys   pformatk s   c    s-   p q d |  _ r |  i | ƒ s |  i Sd  S(   Ni    (   s   selfs   _PrettyPrinter__recursives   pformats   object(   s   selfs   objects*   /usr/lib/python1.5/site-packages/pprint.pys   isrecursivep s   c    sD   u v d |  _ w d |  _ x |  i | ƒ y |  i o |  i Sd  S(   Ni    i   (   s   selfs   _PrettyPrinter__recursives   _PrettyPrinter__readables   pformats   object(   s   selfs   objects*   /usr/lib/python1.5/site-packages/pprint.pys
   isreadableu s   c  	  sS  { | | d } } | i t | ƒ ƒ o ~ t | ƒ }  d |  _ n € |  i | | | d ƒ }  t | ƒ } ‚ d | | <ƒ t | ƒ }	 „ t | ƒ |  i d | | j }
 † |
 o |	 t t f j o‹ˆ | i |	 t j o d p d ƒ ‰ |  i d j o Š | i |  i d d ƒ n ‹ t | ƒ } Œ | oÃ  | |  i } Ž |  i | d | | | d  | | ƒ  t | ƒ d j o_ ‘ xU | d d ‘ rD } ’ | i d d | ƒ “ |  i | | | ” | d | | ƒ qŸWn • | |  i } n – |	 t j o
 | d j o — | i d ƒ n ˜ | i |	 t j o d p d	 ƒ nõš |
 o
 |	 t j oÃ› | i d
 ƒ œ |  i d j o  | i |  i d d ƒ n ž t | ƒ } Ÿ | oT  | |  i } ¡ | i ƒ  } ¢ | i ƒ  £ | d \ } } ¤ |  i | | | ƒ d } ¥ | i | ƒ ¦ |  i | | | t | ƒ § | d | | ƒ ¨ t | ƒ d j o © x… | d d © rt \ } } ª |  i | | | ƒ d } « | i d d | | ƒ ¬ |  i | | | t | ƒ ­ | d | | ƒ qŽWn ® | |  i } n ¯ | i d ƒ n ² | i | ƒ ³ | | =d  S(   Ni   s   [s   (s    i    s   ,
s   ,s   ]s   )s   {s   : s   }(   s   levels   contexts   has_keys   ids   objects
   _Recursions   selfs   _PrettyPrinter__recursives   _PrettyPrinter__reprs   reps   objids   types   typs   lens   _PrettyPrinter__widths   indents	   allowances   sepLiness   ListTypes	   TupleTypes   streams   writes    _PrettyPrinter__indent_per_levels   lengths   _PrettyPrinter__formats   ents   DictTypes   itemss   sorts   key(   s   selfs   objects   streams   indents	   allowances   contexts   levels   reps   objids   typs   sepLiness   lengths   ents   itemss   keys*   /usr/lib/python1.5/site-packages/pprint.pys   __format{ sj   $$
 	(
 c    sJ   µ ¶ t  | | |  i | ƒ \ } } · | o ¸ d |  _ n ¹ | Sd  S(   Ni    (	   s
   _safe_reprs   objects   contexts   selfs   _PrettyPrinter__depths   levels   reprs   readables   _PrettyPrinter__readable(   s   selfs   objects   contexts   levels   reprs   readables*   /usr/lib/python1.5/site-packages/pprint.pys   __reprµ s   !(   s   Nones   __init__s   pprints   pformats   isrecursives
   isreadables   _PrettyPrinter__formats   _PrettyPrinter__repr(    s*   /usr/lib/python1.5/site-packages/pprint.pys   PrettyPrinterG s    :c    s‚  ¼ ½ | d } ¾ t |  ƒ } ¿ | t t t f j o |  o, À |  } Á | | o | d d j f Sn Â | i	 t
 |  ƒ ƒ o Ã t |  ƒ d f Sn Ä t
 |  ƒ } Å d | | <Æ d } Ç | t j oRÈ | o
 | | j o É d } Ê d } n"Ì |  i ƒ  }	 Í |	 d \ }
 } Î t |
 | | | ƒ \ } } Ï t | | | | ƒ \ } } Ð | o | o | } Ñ d | | f } Ò x† |	 d d Ò ru \ }
 } Ó t |
 | | | ƒ \ } } Ô t | | | | ƒ \ } } Õ | o | o | } Ö d | | | f } q—W× | d } nDÙ | t j o
 d d	 f p
 d
 d f \ } } Ú | o
 | | j o Û | d } Ü d } n× Þ t |  d | | | ƒ \ } } à | o | } á | | } â |  d } ã | o% ä | t j o å | d } n n æ xT | d æ rG } ç t | | | | ƒ \ } } é | o | } ê d | | f } qWë | | } ì | | =í | | f Sd  S(   Ni   i    s   <s   {...}s   {%s: %ss
   %s, %s: %ss   }s   [s   ]s   (s   )s   ...s   ,s   %s, %s(   s   levels   types   objects   typs   DictTypes   ListTypes	   TupleTypes   reps   contexts   has_keys   ids
   _Recursions   objids   readables	   maxlevelss   ss   itemss   ks   vs
   _safe_reprs   kreprs	   kreadables   vreprs	   vreadables   terms   subreprs   subreadables   tails   ent(   s   objects   contexts	   maxlevelss   levels   typs   reps   objids   readables   ss   itemss   ks   vs   kreprs	   kreadables   vreprs	   vreadables   terms   subreprs   subreadables   tails   ents*   /usr/lib/python1.5/site-packages/pprint.pys
   _safe_repr¼ s\   !
"		 /" 	
i    s
   _Recursionc      s   ð ó d „  Z  ÷ d „  Z RS(   Nc    s,   ó ô d t  | ƒ i t | ƒ f |  _ d  S(   Ns   <Recursion on %s with id=%s>(   s   types   objects   __name__s   ids   selfs   _Recursion__repr(   s   selfs   objects*   /usr/lib/python1.5/site-packages/pprint.pys   __init__ó s   c    s   ÷ ø |  i Sd  S(   N(   s   selfs   _Recursion__repr(   s   selfs*   /usr/lib/python1.5/site-packages/pprint.pys   __repr__÷ s   (   s   __init__s   __repr__(    s*   /usr/lib/python1.5/site-packages/pprint.pys
   _Recursionð s   N(   s   __doc__s   typess   DictTypes   ListTypes	   TupleTypes	   cStringIOs   StringIOs   ImportErrors   Nones   pprints   pformats
   isreadables   isrecursives   safereprs   PrettyPrinters
   _safe_reprs
   _Recursion(    s*   /usr/lib/python1.5/site-packages/pprint.pys   ?# s   u4