mò á¸Ec@s dZdkZdklZdklZdklZdklZdkZhZ ydk Z e i e i ƒWne j onXdeifd„ƒYZdefd „ƒYZeeƒd efd „ƒYZeeƒd efd „ƒYZeeƒd„ZdS(s_ API documentation help topics. $Id: APIHelpTopic.py 41186 2006-01-07 14:57:15Z andreasjung $ N(sClassSecurityInfo(sDTMLFile(sInitializeClass(s Persistentt APIHelpTopiccBs>tZdZdZfZd„ZedeƒƒZd„Z RS(s! Provides API documentation. ic Csº||_||_h}t||ƒ|iddƒ|_g|_g|_ xÓ|i ƒD]Å\}}t i|ƒ pt ||j o—t|ƒtijo|iit|dƒƒqt|dƒo|iit|dƒƒqt|ƒtijo|i it|dƒƒqqYqYW|ipi|iidƒ}xT|diƒ}|o|idƒd|_Pn|idƒ|pPqAqAWn|ip|idi|_ndS(Nt__doc__titisImplementedByInstancesOfis t:(tidtselfttitletdicttexecfiletfiletgettdoctapistfuncstitemstktvt_ignore_objectsthas_keyttypettypest ClassTypetappendtAPIDocthasattrt FunctionTypet MethodDoctsplittlineststriptlinetpoptname( RRRR RRRRR((t3/data/zmath/zope/lib/python/HelpSys/APIHelpTopic.pyt__init__+s:      "%   sdtml/APIHelpViewcCsed|i|if}xH|i|iD]6}yd||iƒf}Wq'tj oq'Xq'W|S(s6The full text of the Help Topic, for indexing purposess%s %sN( RRR ttextR RtapitSearchableTexttAttributeError(RR$R%((R"R&Ss ( t__name__t __module__RtisAPIHelpTopicRR#tDTMLFiletglobalst index_htmlR&(((R"R$s  &RcBs™tZdZeƒZeihde<de<de<de<de<de<ƒfZdd„Zd „Z d „Z d „Z e d e ƒƒZRS( s Describes an API. t attributest constructorR textendsR!tmethodsicCs)|o|i|ƒn|i|ƒdS(N(t isInterfaceRt_createFromInterfacetklasst_createFromClass(RR4R2((R"R#hscCs£|i|_t|iƒ|_g|_g|_g|_ xc|i ƒD]U\}}t |dƒo|i it|dƒƒqF|iit||iƒƒqFWdS(NtgetSignatureInfoi(R4R(RR!ttrim_doc_stringRR R0R.R1tnamesAndDescriptionsRRRRRt AttributeDoc(RR4RR((R"R3ns    cCsP|i|_t|iƒ|_t|dƒoig|_x]|i D]N}|i dƒ}d|d|d|df}|ii|d|fƒqAWnt|dƒot|iƒ|_ng|_g|_xz|iiƒD]i\}}|d joPt|ƒtijo|iit|dƒƒqH|iit||ƒƒqßqßWdS( Nt __extends__t.s%s/Help/%s.py#%siiit__constructor__R(s __extends__s__doc__s__constructor__(R4R(RR!R7RR RR0R:tbaseRtnamesturlRRR<R/R.R1t__dict__RRRRRRR9(RR4R?R=RRR>((R"R5‡s&   "    cCsnd|i|if}x$|iD]}d||if}q Wx*|iD]}d||i|if}qGW|S(sB The full text of the API, for indexing purposes. s%s %ss%s %s %sN(RR!R R$R.t attributeR1tmethod(RR$RBRA((R"R&«s  s dtml/APIView(R(R)RtClassSecurityInfotsecuritytsetDefaultAccesstTrueR0R#R3R5R&R+R,tview(((R"R]s  C   $ R9cBsQtZdZeƒZeihde<de<ƒd„Zede ƒƒZ RS(s' Describes an attribute of an API. R!tvaluecCs||_||_dS(N(R!RRH(RR!RH((R"R#Âs sdtml/attributeView( R(R)RRCRDRERFR#R+R,RG(((R"R9»s   RcBs–tZdZeƒZeihde<de<de<de<de<de<ƒeZeZ dd„Z d „Z d „Z e d eƒƒZRS( s÷ Describes a method of an API. required - a sequence of required arguments optional - a sequence of tuples (name, default value) varargs - the name of the variable argument or None kwargs - the name of the kw argument or None R tkwargsR!toptionaltrequiredtvarargsicCs)|o|i|ƒn|i|ƒdS(N(R2Rt_createFromInterfaceMethodtfunct_createFromFunc(RRNR2((R"R#ÜscCs²|i|_t|iƒ|_|i|_g}x8|i t |iƒD] }|i ||i |fƒqGWt|ƒ|_ |io|i|_n|io|i|_ndS(N(RNR(RR!R7RR RKtoptt positionaltlentpRRJttupleRLRI(RRNRPRS((R"RMâs    c Cs1t|dƒo |i}n|i|_t|iƒ|_d}d}|i i }|i i}|iot|iƒ}nd}||| |_|io-ttd||||!|iƒƒ|_n f|_g}|}|i i|@o|||_|d}n|i i|@o|||_ndS(Ntim_funciiii(RRNRUR(RR!R7RR t CO_VARARGStCO_VARKEYWORDSt func_codet co_varnamesR>t co_argcounttnrargst func_defaultsRRt nrdefaultsRKRTtmaptNoneRJRLtixtco_flagsRI( RRNR[R]R`RVRLRWR>((R"ROïs.        sdtml/methodView(R(R)RRCRDRERFR_RLRIR#RMROR+R,RG(((R"RËs  C  cCsí|iƒ}|iddƒ}|idƒ}|dg}t|ƒdjo“d}x`|dD]T}|pq^nt|ƒt|i ƒƒ}||jp |djo |}q^q^Wx'|dD]}|i ||ƒqÁWndi |ƒS(sR Trims a doc string to make it format correctly with structured text. s s iiN(R$RtreplaceRRtnlinesRRR_t min_indentRtlstriptindentRtjoin(R$RfRdRRRc((R"R7s$    (RRt AccessControlRCtGlobalsR+tInitializeClasst Persistentt HelpTopicRt InterfacetupdateR@t ImportErrorRRR9RR7( RlR9RCRkR+R7RRRmRjRRR((R"t?s(       9[  E