
    f'	                     &    d Z ddlZd ZddZddZy)z; Pretty-Print an Interface object as structured text (Yum)     Nc                 d   | j                         } | j                  dd      } | j                  d      }|d   g}t        |      dkD  rYd}|dd D ]1  }t        |      t        |j	                               z
  }||k  s|0|}3 |dd D ]  }|j                  ||d         dj                  |      S )zR
    Trims a doc string to make it format
    correctly with structured text.
    

r      N)stripreplacesplitlenlstripappendjoin)textlinesnlines
min_indentlineindents         h/var/dept/share/cheung/public_html/OutSchool/python/env/lib/python3.12/site-packages/Interface/pprint.pytrim_doc_stringr      s    
 
D	fd	#D
**T
E!H:F
5zA~
!"I 	"Dt9s4;;=11F
"j&8!
	" !"I 	-DMM$z{+,	-99V    c                    g }|rd|z  }t        j                  | t        j                  dd            j                  j	                         } | D ]:  }dj                  ||g      }t        |      |kD  s%|j                  |       d|z  }< |j                  |       dj                  |      S | j                  dd      j	                  d      } | D ]  }|j                  d|z  |z           dj                  |      S )z9 indent and justify text, rejustify (munge) if specified  r   z   r   )	string	translate	maketransr   r	   r   r
   r   r   )r   levelmungewidthr   r   words          r   justify_and_indentr!      s     EU{  v'7'7'EFMMSSU 	D77D$<(D4y5 T"U{		 LLyy ||FD)//6 	0DLL3;$./	0 yyr   c                    d| j                         z  }d}| j                         r)|t        t        | j                               |      z   dz   }| j	                         rY|d|z  z   dz   }|dz   }| j	                         D ]1  }d|j                         z  }|t        t        |      ||      z   dz   }3 |dz
  }|dz   }| j                         D ]  \  }}t        |d      r4|j                         |j                         d|j                         }n#|j                         d|j                         }|t        t        |      ||      z   dz   } |S )	zi Output structured text format.  Note, this will wack any existing
    'structured' format of the text.  z%s

r   z

r   zThis interface extends:

zo %sgetSignatureReprz -- )getNamegetDocr!   r   getBasesnamesAndDescriptionshasattrr#   )Ir   outpr   bitemnamedescs           r   interface_as_stxr/   6   sJ    aiik!DExxz()DeLLvUzz|sU{#&CC	 	[AAIIK'D,_T-BE5QQTZZD	[ 	AIE,,. X
d4+,#'<<>43H3H3JDKKMZD!%?D()>uMMQWWX Kr   )r   H   )r   )__doc__r   r   r!   r/    r   r   <module>r3      s    A * 8r   