Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/zope/interface/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/zope/interface/document.pyc


Kc@s:dZddlZddZdZdddZdS(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 110536 2010-04-06 02:59:44Z tseaver $
iNicCs2|jg}|j}d}|jrL|tt|j|ng|jD]}|tjjk	rV|^qV}|r|td|||d7}x:|D]2}d|j}|tt|||qW|d8}n|j	}	|	j
|td|||d7}xd|	D]\\}
}t|ds'd|j|jp]df}|tt|||q'q'W|d8}|td|||d7}xm|	D]e\}
}t|drd	|j|j|jpdf}|tt|||qqWd
j
|d
S(sj Output structured text format.  Note, this will whack any existing
    'structured' format of the text.  isThis interface extends:so %ssAttributes:tgetSignatureStrings%s -- %ssno documentationsMethods:s
%s%s -- %ss

(tgetNametappendtgetDoct_justify_and_indentt_trim_doc_stringt	__bases__tzopet	interfacet	InterfacetnamesAndDescriptionstsortthasattrRtjoin(tItmungetrtoutptleveltbasetbasestbtitemR
tnametdesc((s;/usr/lib/python2.7/dist-packages/zope/interface/document.pytasStructuredTextsD	"


 


#

	#cCs|jddjd}|jdg}|rtg|D]"}t|t|j^q=}x"|D]}|j||qoWndj|S(sJ Trims a doc string to make it format
    correctly with structured text. s
s
i(treplacetsplittpoptmintlentlstripRR
(ttexttlinestnlinestlinet
min_indent((s;/usr/lib/python2.7/dist-packages/zope/interface/document.pyRFs/
iHcCsd|}|rg}|}|j}xX|D]C}dj||g}t||kr/|j||}q/q/W|j|dj|S||jjddjdd|SdS(s9 indent and justify text, rejustify (munge) if specified t s
s
N(RR
RRtstripR(R RRtwidthtindentR!R#tword((s;/usr/lib/python2.7/dist-packages/zope/interface/document.pyRUs





(t__doc__tzope.interfaceRRRR(((s;/usr/lib/python2.7/dist-packages/zope/interface/document.pyt<module>s/