File: //opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/OutputHandling.pyc
�
;�Pc           @   sv   d  d
 d �  �  YZ  d d d �  �  YZ d d d �  �  YZ d d d �  �  YZ d d d	 �  �  YZ d
 d d �  �  YZ d S(   t
   OutputHandlerc           B   s   e  Z d  �  Z RS(   c         C   s   | |  _  | |  _ d  S(   N(   t   modt   output_file(   t   selfR   R   (    (    sM   /opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/OutputHandling.pyt   __init__   s    	(   t   __name__t
   __module__R   (    (    (    sM   /opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/OutputHandling.pyR       s   t   OutputBufferc           B   sA   e  Z d d  � Z d �  Z d �  Z d �  Z d �  Z d �  Z RS(   c         C   sU   | |  _  | j j j �  |  _ | d  k r3 i  } n  | |  _ d g |  _ d |  _ d  S(   Nt    i    (	   R   t   _roott	   cStringIOt   StringIOt   striot   Nonet   optst   linest   line_no(   R   R   R   (    (    sM   /opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/OutputHandling.pyR   
   s    			c         C   s   |  j  j | � S(   N(   R   t   get(   R   t   opt(    (    sM   /opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/OutputHandling.pyt   getopt   s    c         C   s   d j  |  j � S(   Ns   
(   t   joinR   (   R   (    (    sM   /opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/OutputHandling.pyt   getvalue   s    c         C   s#   |  j  d 7_  |  j j d � d  S(   Ni   R   (   R   R   t   append(   R   (    (    sM   /opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/OutputHandling.pyt   new_line   s    c         C   sP   | j  d � } x) | d  D] } |  j | � |  j �  q W|  j | d � d  S(   Ns   
i����(   t   splitt	   write_segR   (   R   t   sR   t   line(    (    sM   /opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/OutputHandling.pyt   write   s
    
c         C   s   |  j  |  j c | 7<d  S(   N(   R   R   (   R   R   (    (    sM   /opt/alt/python27/lib64/python2.7/site-packages/guppy/heapy/OutputHandling.pyR   &