mò á¸Ec@sÀdZdkZdkZdddd„Zddd„Zdd„ZdZdZd Ze d joXeed d ƒGHeeƒGHeed d ƒGHeeƒGHeed d ƒGHeeƒGHndS( s[ Revision information: $Id: TextBlockFormatter.py 40218 2005-11-18 14:39:19Z andreasjung $ NiPic Cs titi|ddƒƒ}ti|dƒ}g}xR|D]J}t|ƒ|djo|i |ƒq=t ||ƒ}|i |ƒq=Wg} d}x_|D]W}d|}|djo|o|d|}n| i d||fƒ|d}qžWti| dƒS(Ns ts iit s%s%s(tstringt expandtabstreplacettexttsplittlinest aggregatetlinetlent max_widthtappendt splitlonglinetextendtouttitindenttspacesttrailing_lines_indent_moretjoin( RR RRRRRRR R((tD/data/zmath/zope/lib/python/Zope2/Startup/misc/TextBlockFormatter.pytformats& c CsÃt|ƒ|jo |gSn|d|}|| } ||}ttit|ƒt |dƒƒƒ}d}| g}xDt |ƒD]6}||||d!}|i|ƒ||d}q…W|S(Nii(R twordR tlinepostfirst_chunk_lent firstchunktinttmathtceiltfloatt numchunkstindexttmptrangetchunknumtchunkR ( RR RR!R RR$RR#R((Rt splitword)s   )   cCsti|ƒ}ti|dƒ}d} g} d} d} xK|oC|idƒ}|pq<nt |ƒ|joOt ||| ƒ} | d}x0| dD] } |i| | ƒ| d} qšWn|o|d}nd}|djo| i|ƒ| d} q<n| t |ƒt |ƒ}||djo$| i|ƒ| idƒd} n"| i|ƒ| t |ƒd} | d} q<Wd}d}x`| D]X}|djod|}n2|djod||f}nd||f}|}qšWti|dƒS( NRiiRs%s s%s%ss%s %ss (RtstripR RtwordstwordnumRtlinelentpopRR R R%t new_wordstnew_wordtinsertt next_wordtNoneR t maybe_lentstlasttitem(R R RR3R2R0R1R.R'R(RR)R,R+((RR :sX            s® To turn a component into a product you must fulfill many contracts. For the most part these contracts are not yet defined in terms of interfaces. Instead you must subclass from base classes that implement the contracts. This makes building products confusing, and this is an area that we are actively working on improving. Hereisalonglinethatshouldbecaughtandbrokenupbytheformatter,hopefullyitllgetsplitupwhenirunitthroughthere.sj Hereisalonglinethatshouldbecaughtandbrokenupbytheformatter,hopefullyitllgetsplitupwhenirunitthroughthere.s° To turn a component into a product you must fulfill many contracts. For the most part these contracts are not yet defined in terms of interfaces. Instead you must subclass from base classes that implement the contracts. This makes building products confusing, and this is an area that we are actively working on improving. Hereisalonglinethatshouldbecaughtandbrokenupbytheformatter,hopefullyitllgetsplitupwhenirunitthroughthere.t__main__i<i ( t__doc__RRRR%R tlongtlong2tlong3t__name__(R RRR8R7R6R%R((Rt?s 2