Ñò ¶TJJc@s:dZddkZdd„Zd„Zddd„ZdS(sÔ Pretty-Print an Interface object as structured text (Yum) This module provides a function, asStructuredText, for rendering an interface as structured text. $Id: document.py 39768 2005-10-31 13:57:35Z tlotze $ iÿÿÿÿNic CsI|iƒg}|i}d}|iƒo#|tt|iƒƒ|ƒƒng}|iD]$}|tiij o ||q\q\~}|ok|td||ƒƒ|d7}x:|D]2}d|iƒ} |tt| ƒ||ƒƒq·W|d8}n|i ƒ} | i ƒ|td||ƒƒ|d7}xg| D]_\} } t | dƒpCd| iƒ| iƒpdf} |tt| ƒ||ƒƒq8q8W|d8}|td||ƒƒ|d7}xp| D]h\} } t | dƒoLd | iƒ| i ƒ| iƒpdf} |tt| ƒ||ƒƒqÌqÌWd i |ƒd S( sj Output structured text format. Note, this will whack any existing 'structured' format of the text. isThis interface extends:so %ss Attributes:tgetSignatureStrings%s -- %ssno documentationsMethods:s %s%s -- %ss (tgetNametappendtgetDoct_justify_and_indentt_trim_doc_stringt __bases__tzopet interfacet InterfacetnamesAndDescriptionstsortthasattrRtjoin( tItmungetrtoutptlevelt_[1]tbasetbasestbtitemR tnametdesc((s=/usr/lib64/python2.6/site-packages/zope/interface/document.pytasStructuredTextsJ  # '       $     $cCs¤|iddƒidƒ}|idƒg}|octg}|D]#}|t|ƒt|iƒƒqB~ƒ}x#|D]}|i||ƒqxWndi|ƒS(sJ Trims a doc string to make it format correctly with structured text. s s i(treplacetsplittpoptmintlentlstripRR (ttexttlinestnlinesRtlinet min_indent((s=/usr/lib64/python2.6/site-packages/zope/interface/document.pyRFs 3iHcCsÂd|}|oƒg}|}|iƒ}xZ|D]E}di||gƒ}t|ƒ|jo|i|ƒ|}q0q0W|i|ƒdi|ƒS||iƒiddƒidd|ƒSdS(s9 indent and justify text, rejustify (munge) if specified t s s N(RR RRtstripR(R!RRtwidthtindentR"R$tword((s=/usr/lib64/python2.6/site-packages/zope/interface/document.pyRUs    (t__doc__tzope.interfaceRRRR(((s=/usr/lib64/python2.6/site-packages/zope/interface/document.pyts  /