Efc@sdZdZdZdZdZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlmZddlmZmZmZmZmZmZmZmZdd lmZydd lmZWn'ek r!d efd YZnXd ZdZ dZ!dZ"dZ#dZ$dZ%ej&dej'Z(dZ)dZ*dZ+dZ,e-e-dZ.dZ/dZ0dZ1idZ2de3fdYZ4d Z5d!id"Z6d#fd$YZ7d%efd&YZ8d'e7fd(YZ9d)efd*YZ:d+e7fd,YZ;d-a<d.Z=d/Z>d0Z?d1Z@d2ZAd3ZBd4ZCd!d5ZDe;ZEe9ZFd6fd7YZGeHeGZId!d8ZJd9d!d:ZKd9d!d;ZLd!d<ZMd=e-d>ZNd?fd@YZOeOZPdAfdBYZQdCfdDYZRdEZSe-e-dFZTdGZUdHZVdIZWeXdJkreWndS(KsGenerate Python documentation in HTML or text for interactive use. In the Python interpreter, do "from pydoc import help" to provide online help. Calling help(thing) on a Python object documents the object. Or, at the shell command line outside of Python: Run "pydoc " to show documentation on something. may be the name of a function, module, package, or a dotted reference to a class or function within a module or module in a package. If the argument contains a path segment delimiter (e.g. slash on Unix, backslash on Windows) it is treated as the path to a Python source file. Run "pydoc -k " to search for a keyword in the synopsis lines of all available modules. Run "pydoc -p " to start an HTTP server on a given port on the local machine to generate documentation web pages. Run "pydoc -w " to write out the HTML documentation for a module to a file named ".html". Module docs for core modules are assumed to be in http://docs.python.org/library/ This can be overridden by setting the PYTHONDOCS environment variable to a different URL or to a local directory containing the Library Reference Manual pages. sKa-Ping Yee s26 February 2001s$Revision: 88564 $sGuido van Rossum, for an excellent programming language. Tommy Burnette, the original creator of manpy. Paul Prescod, for all his work on onlinehelp. Richard Chamberlain, for the first implementation of textdoc. iN(tRepr(t expandtabstfindtjointlowertsplittstriptrfindtrstrip(t extract_tb(tdequeR cBseZdZRS(cCs |jdS(Ni(tpop(tself((s/usr/lib64/python2.7/pydoc.pytpopleft=s(t__name__t __module__R (((s/usr/lib64/python2.7/pydoc.pyR <scCsg}g}xvtjD]k}tjj|p.d}tjj|}||krtjj|r|j||j|qqW|S(sAConvert sys.path into a list of absolute, existing, unique paths.t.(tsystpathtostabspathtnormcasetisdirtappend(tdirstnormdirstdirtnormdir((s/usr/lib64/python2.7/pydoc.pytpathdirsBs cCsCtj|ptj|}|r?tjddt|pBdS(s-Get the doc string or comments for an object.s^ * t(tinspecttgetdoct getcommentstretsubR(tobjecttresult((s/usr/lib64/python2.7/pydoc.pyRNscCstt|d}t|dkr5|ddfSt|dkrst|d rs|dt|ddfSdt|dfS(s>Split a doc string into a synopsis line (if any) and the rest.s iiRi(RRtlenRR(tdoctlines((s/usr/lib64/python2.7/pydoc.pytsplitdocSs #cCs0|j}|j|kr,|jd|}n|S(s@Get a class name and qualify it with a module name if necessary.R(RR(R#tmodnametname((s/usr/lib64/python2.7/pydoc.pyt classname\s cCsYtj|pWtj|pWtj|pWtj|pWtj|pWtj| S(s>Check if an object is of a type that probably means it's data.(Rtismoduletisclasst isroutinetisframet istracebacktiscode(R#((s/usr/lib64/python2.7/pydoc.pytisdatacscGs;x4|r6tt||d|d}|d}qW|S(s/Do a series of global replacements on a string.iii(RR(ttexttpairs((s/usr/lib64/python2.7/pydoc.pytreplaceis  cCsbt||kr^td|dd}td|d|}|| d|t||S|S(sCOmit part of a string if needed to make it fit in a maximum length.iiis...(R%tmax(R3tmaxlentpretpost((s/usr/lib64/python2.7/pydoc.pytcramps s at 0x[0-9a-f]{6,16}(>+)$cCstjd|S(s>Remove the hexadecimal id from a Python object representation.s\1(t _re_stripidR"(R3((s/usr/lib64/python2.7/pydoc.pytstripidyscCstj|ptj|S(N(Rtismethodtismethoddescriptor(tobj((s/usr/lib64/python2.7/pydoc.pyt_is_some_method~scCsi}x*tj|tD]\}}d||s>(R5(R R3((s/usr/lib64/python2.7/pydoc.pytescape{scCstj||S(N(RR(R R#((s/usr/lib64/python2.7/pydoc.pyR~scCstt|dr_dttt|jd}t||r_t||||Sn|jttt ||j S(NRtrepr_RY( R]RRRRRFRR:R<RR(R RPtlevelt methodname((s/usr/lib64/python2.7/pydoc.pytrepr1s "cCst||j}t|}d|krcdt|ddkrcd|d|j||dStjdd|j|S(Ns\s\\RRis-((\\[\\abfnrtv\'"]|\\[0-9]..|\\x..|\\u....)+)s\1(R:RRR5RR!R"(R RPRttestttestrepr((s/usr/lib64/python2.7/pydoc.pyt repr_strings $! cCsKy)|jttt||jSWn|jd|jjSXdS(Ns <%s instance>(RR:R<RRt __class__R(R RPR((s/usr/lib64/python2.7/pydoc.pyt repr_instances)( RRRSRiRRRRtrepr_strRt repr_unicode(((s/usr/lib64/python2.7/pydoc.pyRss      tHTMLDoccBsOeZdZeZejZejZdZddZdddddZ dZ dZ d d Z d Zd Zd ZdZdZdiiidZddZdddZddiidZdZddiiiddZdZddddZdddZddddZddZRS(s'Formatter class for HTML documentation.cCsd||fS(sFormat an HTML page.s Python: %s %s ((R ttitletcontents((s/usr/lib64/python2.7/pydoc.pytpagesRcCsd|||||pdfS(sFormat a page heading.s'
 
 
%s
%s
s ((R Rtfgcoltbgcoltextras((s/usr/lib64/python2.7/pydoc.pytheadings is c Csz|dkr!dd|d}nd|||f} |rW| d||||f} n| d|||f} | d|S( s Format a section with a heading.ss ss

sR s( s'
 
%s
%s %s
%s
%s%s%s
N(R^( R RRRRtwidthtpreludet marginaliatgapR$((s/usr/lib64/python2.7/pydoc.pytsections cGsd|}|j||S(s$Format a section with a big heading.s%s(R(R RR((s/usr/lib64/python2.7/pydoc.pyt bigsections c Cs7|jt|}t|dddddddd S(s!Format literal preformatted text.s s Rs s s
(RRR5(R R3((s/usr/lib64/python2.7/pydoc.pyt preformatsicCsd}t||d|}xt|D]u}|dd|}xPt|||||D]3}|t|kr_||||d}q_q_W|d}q+Wd|S(s0Format a list of items into a multi-column list.Risids
ss7%s
(R%trange(R tlisttformattcolsR$trowstcolti((s/usr/lib64/python2.7/pydoc.pyt multicolumns"cCsd|S(Ns%s((R R3((s/usr/lib64/python2.7/pydoc.pytgreyscGs3x,|D]$}||krd|||fSqW|S(s:Make a link for an identifier, given name-to-URL mappings.s%s((R R*tdictstdict((s/usr/lib64/python2.7/pydoc.pytnamelinks  cCsm|jtjj|j}}t||r`t|||kr`d|j|t||fSt||S(sMake a link for a class.s%s(RRRRxRR]RFR+(R R#R)R*R((s/usr/lib64/python2.7/pydoc.pyt classlinks $cCsd|j|jfS(sMake a link for a module.s%s(R(R R#((s/usr/lib64/python2.7/pydoc.pyt modulelinkscCso|\}}}}|r%|j|S|r>d||f}n d|}|r[d|}n|}d||fS(s;Make a link for a module or package to display in an index.s %s.%s.htmls%s.htmls"%s (package)s%s(R(R RcR*RRntshadowedturlR3((s/usr/lib64/python2.7/pydoc.pyt modpkglinks   cCs|p |j}g}d}tjd}xtr|j||} | sOPn| j\} } |j|||| !| j\} } }}}}| r|| jdd}|jd||fn|rdt |}|jd||| fn|r=dt |}|jd||| fnl|| | d!d krv|j|j ||||n3|r|jd |n|j|j ||| }q-W|j|||t |d S( sMark up some plain text, given a context of symbols to look for. Each context dictionary maps object names to anchor names.isD\b((http|ftp)://\S+[\w/]|RFC[- ]?(\d+)|PEP[- ]?(\d+)|(self\.)?(\w+))t"s"s%ss'http://www.rfc-editor.org/rfc/rfc%d.txts(http://www.python.org/dev/peps/pep-%04d/it(sself.%sR( RR!tcompileRktsearchtspanRtgroupsR5tintRR(R R3RtfuncstclassesRHtresultstheretpatterntmatchtstarttendR_tschemetrfctpeptselfdotR*R((s/usr/lib64/python2.7/pydoc.pytmarkup s8   " c Cs d}x|D]}t|td kr|\}}|d}||j||}|r||fkrg}x'|D]} |j|j| |qyW|dt|dd}n|d}q t|tgkr |d|j|||}q q Wd|S( sAProduce HTML for a class tree as given by inspect.getclasstree().Rs"

Rs, t)s
s
%s
s
%s
((RRRRt formattree( R ttreeR)tparentR$tentrytctbasestparentsRK((s/usr/lib64/python2.7/pydoc.pyR1s       c$ Gs|j}y |j}Wntk r/d}nXt|d}g}xJtt|dD]2}|jdt||d d||fq\Wt||dd} d| } yVt j |} | } t j dkrddl } | j| } nd| | f}Wntk r"d }nXg}t|d rt|j}|d d.kr}|dd kr}t|d d!}n|jd|j|nt|dr|j|jt|jn|r| dt|d} n|j|}|dk rdt}nd}|j| ddd||}t j|t j}gi}}xt j|t jD]t\}}|dk st j|p||krtt|||r|j||fd|||<||%sis)%stwin32Ns%ss (built-in)t __version__i t$s Revision: s version %st__date__s (%s)s, s(
Module DocsRs#ffffffs#7799eesindex
Ros.html#s#-s %ss

%s

RUisPackage Contentss#aa55cccSs|j|dS(Ni(R(t key_valueRL((s/usr/lib64/python2.7/pydoc.pytstModulescSs|dS(Ni((R((s/usr/lib64/python2.7/pydoc.pyRstClassess#ee77aat Functionss#eeaa77tDatas#55aa55s
t __author__tAuthort __credits__tCreditss $Revision: (7Rt__all__RR^RRR%RRRRRtplatformt nturl2patht pathname2urlRR]tstrRRRRRtlocalsRRAR,R-t getmoduleRaRBRRRxRFR.t isbuiltint isfunctionR2RRRtpkgutilt iter_modulesRUtsortRRRRgRt getclasstreeRR#R%($R R#R*tmodtignoredR_tpartstlinksRt linkednametheadRRR)tfilelinkRRRR$RRtcdictRIRJRKR)RRtfdictRcR&tmodpkgstimportertispkgRt classlist((s/usr/lib64/python2.7/pydoc.pyRDs    '     "   "  ! + " $!"   !& &    c s j}|p|}j}g} | jdd(fdY} | ttj} t| dkrjdx+| D]#} dj| j qWdnfd} fd}fd }t fd t }ix}|D]u\}}}}d |d ||<}yt |}Wnt k rnXy|| i(RB(R (tpush(s/usr/lib64/python2.7/pydoc.pytmaybes  (RRRiRD((RC(s/usr/lib64/python2.7/pydoc.pyRAs is&
Method resolution order:
s
%s
s
c st||\}}|rj|x|D]\}}}}yt|}Wn*tk rj||n&Xj||dq6Wn|S(Ns (RQRDRFt Exceptiont_docdescriptorR(tmsgtattrsRMtokR*RdthomeclsRJ(RRthrtmdictR4R#RCR (s/usr/lib64/python2.7/pydoc.pytspills   cslt||\}}|rhj|x6|D]+\}}}}j||q6Wn|S(N(RQRDRF(RGRHRMRIR*RdRJRJ(RKR4RCR (s/usr/lib64/python2.7/pydoc.pytspilldescriptorss   c st||\}}|rj|x|D]\}}}}jt||}t|dstj|rt|dd} nd} | dkrd|nBjt |j } d| } d|| fdq6Wn|S(Nt__call__RSs
%s
s
%ss
%s%s
s ( RQRDRRFR]RRbR^RRR( RGRHRMRIR*RdRJRJRKR&(RRRKRLR4R#RCR (s/usr/lib64/python2.7/pydoc.pyt spilldatas$    cst|ddS(NiR?(Ra(Rc(R#(s/usr/lib64/python2.7/pydoc.pyRsRot-ics|dkS(Ni((tt(t thisclass(s/usr/lib64/python2.7/pydoc.pyR&ss defined heresinherited from %ss:
RIcSs|dS(Ni((RR((s/usr/lib64/python2.7/pydoc.pyR4scSst|d|dS(Ni(tcmp(tt1tt2((s/usr/lib64/python2.7/pydoc.pyR6ss Methods %scSs|ddkS(Nitmethod((RR((s/usr/lib64/python2.7/pydoc.pyR:ssClass methods %scSs|ddkS(Nis class method((RR((s/usr/lib64/python2.7/pydoc.pyR<ssStatic methods %scSs|ddkS(Nis static method((RR((s/usr/lib64/python2.7/pydoc.pyR>ssData descriptors %scSs|ddkS(Nisdata descriptor((RR((s/usr/lib64/python2.7/pydoc.pyR@ssData and other attributes %scSs|ddkS(NiRc((RR((s/usr/lib64/python2.7/pydoc.pyRBsRs*class %ss/%s = class %ss(%s)s, s%s
 
s#000000s#ffc8d8i((RRBRR RtgetmroR%RDRRtfilterRhRFRERR RQt __builtin__R#R2RRRRR(R R#R*R4RRR5trealnameRRRAtmroRKRMRNRPRHRIRdRJRJtanchort inheritedttagRRR&(( RRRKRLR4R#RCR RSs/usr/lib64/python2.7/pydoc.pyRs         $ $                       $cCs|jd|j|S(s)Format an argument default value as text.t=(RR(R R#((s/usr/lib64/python2.7/pydoc.pyt formatvalueXsc CsG|j}|p|}|r$|jp'dd|} d} d} tj|r|j} |r| |k rd|j| |} qnD|jdk rd|j|jj|} nd|j| |} |j}n||krd| |f} ne|r?||j kr?|j ||kr?d|jd||f}d } n|}d | ||f} tj |rtj |\}}}}tj ||||d |j }|d krd |} |d d!}qnd}| || o|jd| }| rd|S|jt||j|||}|o2d|}d||fSdS(s;Produce HTML documentation for a function or method object.RRQis from s method of %s instances unbound %s methods$%ss%sis)%s = %sRass$%s lambda is(...)s'%ss
%s
s
%s
s
%s
%s
N(RRR=tim_classRtim_selfR^Rtim_funct__dict__R/t getargspect formatargspecRaRRRR(R R#R*R4RRRHRGR[R]tnotetskipdocstimclassRtreallinkRtvarargstvarkwtdefaultstargspectdeclR&((s/usr/lib64/python2.7/pydoc.pyR\sR          cCsxg}|j}|r&|d|n|jdk ra|jt||j}|d|n|ddj|S(Ns!
%s
s
%s
s
R(RRSR^RRRR(R R*RJR4RRCR&((s/usr/lib64/python2.7/pydoc.pyRFs  cCs|j|||S(s*Produce html documentation for a property.(RF(R R#R*R4RG((s/usr/lib64/python2.7/pydoc.pyRscGs'|rd|pd}||j|S(s-Produce HTML documentation for a data object.s%s = R(R(R R#R*R4R5tlhs((s/usr/lib64/python2.7/pydoc.pyRscCs|j|||S(s1Produce html documentation for a data descriptor.(RF(R R#R*R4RG((s/usr/lib64/python2.7/pydoc.pyRscCsg}|dkri}nxLtj|gD]8\}}}|j|d|||kfd||R*R?R((s/usr/lib64/python2.7/pydoc.pytindexs " N(RRRSRt_repr_instanceRRRRR^RRRRRRRRRRRRRRaRRFRRRRr(((s/usr/lib64/python2.7/pydoc.pyRs8           & | 5 tTextReprcBs8eZdZdZdZdZeZdZRS(sAClass for safely making a text representation of a Python object.cCs:tj|d|_|_d|_d|_|_dS(Nii id(RRiRRRRR(R ((s/usr/lib64/python2.7/pydoc.pyRis  cCs{tt|dr_dttt|jd}t||r_t||||Snttt||j S(NRRRY( R]RRRRRFR:R<RR(R RPRR((s/usr/lib64/python2.7/pydoc.pyRs "cCs^t||j}t|}d|krZdt|ddkrZd|d||dS|S(Ns\s\\RRi(R:RRR5(R RPRRR((s/usr/lib64/python2.7/pydoc.pyRs  $cCs9y ttt||jSWnd|jjSXdS(Ns <%s instance>(R:R<RRRR(R RPR((s/usr/lib64/python2.7/pydoc.pyRs (RRRSRiRRRR(((s/usr/lib64/python2.7/pydoc.pyRts    tTextDoccBseZdZeZejZdZddZdZdddZ dddZ dddZ d Z dddd Zd Zdddd Zdddd ZddddddZRS(s'Formatter class for text documentation.cCsttd|dS(s(Format a string in bold by overstriking.cSs |d|S(Ns((tch((s/usr/lib64/python2.7/pydoc.pyRsR(RRg(R R3((s/usr/lib64/python2.7/pydoc.pytboldss cCsX|s dSt|d}t|d|}|rKt|d|d\} } | jj|d r| |kr|j| qqW|r|j||jd t|d }n| rtd | }|jtj|d|g}x0| D](\} } |j|j | | |qW||jdt|d }n| rwg}x0| D](\} } |j|j | | |q)W||jdt|d }n|rg}x6|D].\} } |j|j!| | |ddqW||jdt|d }nt|drKt"|j#}|d d!kr2|ddkr2t$|dd!}n||jd|}nt|dr|||jdt"|j%}nt|dr||jdt"|j&}nt|dr||jdt"|j'}n|S("s5Produce text documentation for a given module object.tNAMEs - s (built-in)tFILEs MODULE DOCSt DESCRIPTIONRUs (package)sPACKAGE CONTENTSs Rt SUBMODULEScSs|dS(Ni((R((s/usr/lib64/python2.7/pydoc.pyRHsitCLASSESt FUNCTIONSR7iFtDATARi Rs Revision: itVERSIONRtDATER#tAUTHORR%tCREDITSNs $Revision: ((RR(RRR'RR^RRRRRAR-R-RaRR.R.R2tsetR]R0R1RUtaddR2RR,R[RgRR3RRR+RRRR#R%(R R#R*R4tsynoptdescR$R_RqRRRIRJRRcR=t modpkgs_namesR>R)R?t submodulesR@RR((s/usr/lib64/python2.7/pydoc.pyRs        " " $ "   ""   " "&" """csj}|p|}j}jd}||krOdj|}nj|d|}|rt||} |dt| d}nt} | r| dgpg} | jtt j } t | dkr&dx"| D]} d || qWd nd d fd Y}|fd }fd}fd}t fdt }x|r| r| jn|ddt|fd\}}tjkr|}qn+kr.d}ndtj}|j|d||d}|d||d}|d||d}|d||d}|d||d}|}qWdj| } | s|dS|djt| ddS(!s4Produce text documentation for a given class object.cSs t||S(N(R+(RR((s/usr/lib64/python2.7/pydoc.pytmakenamenssclass s = class s(%s)s, s isMethod resolution order:s RRAcs eZdZfdZRS(cSs d|_dS(Ni(RB(R ((s/usr/lib64/python2.7/pydoc.pyRiscs'|jrddnd|_dS(NRQiFi(RB(R (RC(s/usr/lib64/python2.7/pydoc.pyRDs (RRRiRD((RC(s/usr/lib64/python2.7/pydoc.pyRAs cst||\}}|rj|xy|D]n\}}}}yt|}Wn*tk rj||q6Xj||q6Wn|S(N(RQRDRFRERFR(RGRHRMRIR*RdRJRJ(RKR4R#RCR (s/usr/lib64/python2.7/pydoc.pyRMs    cslt||\}}|rhj|x6|D]+\}}}}j||q6Wn|S(N(RQRDRF(RGRHRMRIR*RdRJRJ(RKR4RCR (s/usr/lib64/python2.7/pydoc.pyRNs   c st||\}}|rj|x|D]w\}}}}t|dsftj|rut|}nd}jt||ddd|dq6Wn|S(NROR7iFR&s ( RQRDR]RRbRR^RRF( RGRHRMRIR*RdRJRJR&(RKR4R#RCR (s/usr/lib64/python2.7/pydoc.pyRPs  $cst|ddS(NiR?(Ra(Rc(R#(s/usr/lib64/python2.7/pydoc.pyRsics|dkS(Ni((RR(RS(s/usr/lib64/python2.7/pydoc.pyRss defined heresinherited from %ss Methods %s: cSs|ddkS(NiRW((RR((s/usr/lib64/python2.7/pydoc.pyRssClass methods %s: cSs|ddkS(Nis class method((RR((s/usr/lib64/python2.7/pydoc.pyRssStatic methods %s: cSs|ddkS(Nis static method((RR((s/usr/lib64/python2.7/pydoc.pyRssData descriptors %s: cSs|ddkS(Nisdata descriptor((RR((s/usr/lib64/python2.7/pydoc.pyRssData and other attributes %s: cSs|ddkS(NiRc((RR((s/usr/lib64/python2.7/pydoc.pyRss | ((RRBRRwRgRRRR RRXR%RYRhR RQRZR#R+R2RyR(R R#R*R4R5R[RRRRR&RR\RKRARMRNRPRHR^R_((RKR4R#RCR RSs/usr/lib64/python2.7/pydoc.pyRhsl                            cCsd|j|S(s)Format an argument default value as text.R`(R(R R#((s/usr/lib64/python2.7/pydoc.pyRasc Cs|j}|p|}d}d}tj|r|j}|rd||k rdt||}qn>|jdk rdt|jj|}ndt||}|j}n||kr|j |} nH|r||j kr|j ||krd}n|j |d|} tj |rtj |\} } } } tj | | | | d|j}|d kr|j |d } |dd !}qnd }| ||}|r|d St|pd}|d |ot|j|d SdS(s;Produce text documentation for a function or method object.Ris from s method of %s instances unbound %s methodis = Rass lambda is(...)s N(RRR=RbR+RcR^RRdRwReR/RfRgRaRRRy(R R#R*R4RGR[RhRiRjRRRlRmRnRoRpR&((s/usr/lib64/python2.7/pydoc.pyRsB        cCszg}|j}|r5||j||dnt|pDd}|rm||j||dndj|S(Ns R(RRwRRyR(R R*RJR4RRCR&((s/usr/lib64/python2.7/pydoc.pyRFs   cCs|j|||S(s*Produce text documentation for a property.(RF(R R#R*R4RG((s/usr/lib64/python2.7/pydoc.pyRscCs|j|||S(s1Produce text documentation for a data descriptor.(RF(R R#R*R4RG((s/usr/lib64/python2.7/pydoc.pyR sc Cs|j|}|r_|r%|dp(d|}|t|} | dkr_|| d}q_n|rx|j|dp{d|}|dk r|d|jt|7}n|S(s-Produce text documentation for a data object.s = Ris...s N(RR%RwR^RyR+( R R#R*R4RR7R&RRrtchop((s/usr/lib64/python2.7/pydoc.pyR$s #  N(RRRSRtRsRRwRyRR^RRRRaRRFRRR(((s/usr/lib64/python2.7/pydoc.pyRus     dx + cCstat|dS(sCThe first time this is called, determine what kind of pager to use.N(tgetpagertpager(R3((s/usr/lib64/python2.7/pydoc.pyR2s cCstttjtjk rtStjj s<tjj r@tSdtj krtj dkredStj j ddkrdSdSntj j ddkrtStj dkstj j d rd St td rtjd d krdSddl}|j\}}tj|z7t td rZtjd|d krZdStSWdtj|XdS(s2Decide what method to use for paging through text.tPAGERRcSstt|tjdS(NR(t tempfilepagertplainRR(R3((s/usr/lib64/python2.7/pydoc.pyR@stTERMtdumbtemacscSstt|tjdS(NR(t pipepagerRRR(R3((s/usr/lib64/python2.7/pydoc.pyRBscSst|tjdS(NR(RRR(R3((s/usr/lib64/python2.7/pydoc.pyRDstos2cSstt|dS(Nsmore <(RR(R3((s/usr/lib64/python2.7/pydoc.pyRHstsystems(less) 2>/dev/nullicSs t|dS(Ntless(R(R3((s/usr/lib64/python2.7/pydoc.pyRJsiNs more "%s"cSs t|dS(Ntmore(R(R3((s/usr/lib64/python2.7/pydoc.pyRQs(RR(RR(RRtstdoutRtFileTypet plainpagertstdintisattyRRR(RxR[R]RttempfiletmkstempRtttypagertunlink(RtfdR((s/usr/lib64/python2.7/pydoc.pyR8s0  !$  (cCstjdd|S(s%Remove boldface formatting from text.s.R(R!R"(R3((s/usr/lib64/python2.7/pydoc.pyRWscCsEtj|d}y|j||jWntk r@nXdS(s3Page through text by feeding it to another program.twN(RtpopentwriteRR{(R3tcmdtpipe((s/usr/lib64/python2.7/pydoc.pyR[s   cCspddl}|j}t|d}|j||jztj|d|dWdtj|XdS(s<Page through text by invoking a program on a temporary file.iNRs "R(RtmktempRzRRRRR(R3RRRRq((s/usr/lib64/python2.7/pydoc.pyRds    c Cstt|d}yDddl}tjj}|j|}|j|d}Wn&tt fk rd}d}nXz9t j j ddd}}tjjt|| ddx||rtjjd tjj|}|dkrtjjd Pn8|dkrNtjjd ||d|d}qn|dkr|||}|dkrd}qntjjdt||||!dd||}qWWd|r|j||j|nXdS(s%Page through text on a text terminal.s iNcSstjjdS(Ni(RRR(((s/usr/lib64/python2.7/pydoc.pyRxscSstjjd d S(Nii(RRRp(((s/usr/lib64/python2.7/pydoc.pyR{stLINESiis -- more --tqtQs s RttBsi(RR(s s (RtRs(RRtttyRRtfilenot tcgetattrt setcbreakRRR^RRRxRRRtflusht tcsetattrt TCSAFLUSH( R3R'RRtoldtgetcharRtincR((s/usr/lib64/python2.7/pydoc.pyRps@    !        ,cCstjjt|dS(s>Simply print unformatted text. This is the ultimate fallback.N(RRRR(R3((s/usr/lib64/python2.7/pydoc.pyRscCsJtj|rT|jtjkr,d|jSt|drFd|jSd|jSntj|rnd|jStj|rd|jj |jj|jfStj |rd|jj |jj|jfStj |rd|jStj |rd |jStj |rd |jSt|tjkr=d |jjSt|jS( s/Produce a short description of the given thing.sbuilt-in module RUspackage smodule sbuilt-in function sgetset descriptor %s.%s.%ssmember descriptor %s.%s.%ssclass s function smethod s instance of (RR,RRRR]R.Rt __objclass__RRR-R/R=RRt InstanceTypeR(tthing((s/usr/lib64/python2.7/pydoc.pytdescribes2        cCsgt|dD]}|r|^q}d\}}xQ|t|krtt||d d|}|r||d}}q7Pq7W|r|}nt}x:||D].}yt||}Wqtk rdSXqW|S(s@Locate an object by name or dotted path, importing as necessary.RiiN(Ni(RR^R%RRRZRFR(RRRR6Rtnt nextmoduleR#((s/usr/lib64/python2.7/pydoc.pytlocates (     t_OldStyleClasscBseZRS((RR(((s/usr/lib64/python2.7/pydoc.pyRscCsst|tr>t||}|s4td|n||fSt|dd}|t|trh|ndfSdS(sDGiven an object or a path to an object, get the object and its name.s$no Python documentation found for %rRN(RR+RRRFR^(RRR#R*((s/usr/lib64/python2.7/pydoc.pytresolves s Python Library Documentation: %sc Cs3t||\}}t|}tj|}|r`d|kr`|d||jd 7}n&|r||k r|d|j7}nt|tkr|j}nstj |ptj |ptj |ptj |ptj |pt|tst|}|d7}n||dtj||S(sBRender text documentation, given an object or a path to an object.Rs in s in module s objects (RRRR-RRRt_OLD_INSTANCE_TYPERR,R-R.RRRRR3R(RRRR#R*RR((s/usr/lib64/python2.7/pydoc.pyt render_docs$    cCs?ytt|||Wnttfk r:}|GHnXdS(sCDisplay text documentation, given an object or a path to an object.N(RRRR(RRRRJ((s/usr/lib64/python2.7/pydoc.pyR&scCsytt||\}}tjt|tj||}t|dd}|j||jdG|dGHWntt fk r}|GHnXdS(s<Write HTML documentation to a file in the current directory.s.htmlRtwroteN( RthtmlRRRRzRRRR(RRR#R*RRqRJ((s/usr/lib64/python2.7/pydoc.pytwritedocs$  RcCsL|dkri}nx0tj|g|D]\}}}t|q+WdS(sAWrite out HTML documentation for all modules in a directory tree.N(R^R0t walk_packagesR(RtpkgpathtdoneR>R)R?((s/usr/lib64/python2.7/pydoc.pyt writedocs s  %tHelpercBseZidd6dd6d(d6d)d6d*d6d+d 6d,d 6d-d 6dd6d.d6dd6d/d6dd6d0d6dd6d1d6d2d6d3d6d4d6d d!6d5d"6dd$6dd%6d6d&6d7d'6d8d(6d9d*6d:d6d;d+6d<d6d=d.6Zid>d76d?dL6d@d 6dAdM6dBdZ6dCd[6dDd^6Zid_d>6d`d;6dadb6dcdd6dedf6dgdh6didj6d7dk6dldm6dndo6dpdq6drds6drdt6dudv6dudw6ZxdejD]V\ZZxGeD]?Zej eeZ ee kre dxeZ ne ee>Rt|t^t~RRs<=s>=s==s!=s<>t OPERATORStUNARYs+=s-=s*=s/=s%=s&=s|=s^=s<<=s>>=s**=s//=tAUGMENTEDASSIGNMENTtBITWISEtjtJtCOMPLEXsOPERATORS FORMATTINGtPOWERsTUPLES LISTS FUNCTIONSt,s ATTRIBUTES FLOAT MODULES OBJECTSRtELLIPSISs...sSLICINGS DICTIONARYLITERALSt:s def classt@s\t PRIVATENAMESRYsPRIVATENAMES SPECIALMETHODSRXt BACKQUOTESt`sTUPLES FUNCTIONS CALLSRRsLISTS SUBSCRIPTS SLICINGSt[t]RRsRSTRINGS UNICODE NUMBERS SEQUENCES MAPPINGS FUNCTIONS CLASSES MODULES FILES inspecttTYPEStstringss4str UNICODE SEQUENCES STRINGMETHODS FORMATTING TYPESsstring-methodssSTRINGS FORMATTINGt STRINGMETHODSt formatstringst FORMATTINGs:encodings unicode SEQUENCES STRINGMETHODS FORMATTING TYPEStUNICODEtnumberssINTEGER FLOAT COMPLEX TYPEStNUMBERStintegerss int rangetINTEGERtfloatings float mathtFLOATt imaginarys complex cmathttypesseqs%STRINGMETHODS FORMATTING xrange LISTSt SEQUENCESt DICTIONARIEStMAPPINGSttypesfunctionss def TYPESt typesmethodssclass def CLASSES TYPEStMETHODSsbltin-code-objectsscompile FUNCTIONS TYPESt CODEOBJECTSsbltin-type-objectss types TYPESt TYPEOBJECTSt FRAMEOBJECTSt TRACEBACKSsbltin-null-objecttNONEsbltin-ellipsis-objecttSLICINGSsbltin-file-objectstFILESt specialattrstSPECIALATTRIBUTESs!class SPECIALMETHODS PRIVATENAMESR~t typesmodulestPACKAGESsoperator-summaryslambda or and not in is BOOLEAN COMPARISON BITWISE SHIFTING BINARY FORMATTING POWER UNARY ATTRIBUTES SUBSCRIPTS SLICINGS CALLS TUPLES LISTS DICTIONARIES BACKQUOTESt EXPRESSIONSt PRECEDENCEtobjectstOBJECTSt specialnamesstBASICMETHODS ATTRIBUTEMETHODS CALLABLEMETHODS SEQUENCEMETHODS1 MAPPINGMETHODS SEQUENCEMETHODS2 NUMBERMETHODS CLASSEStSPECIALMETHODSt customizations cmp hash repr str SPECIALMETHODSsattribute-accesssATTRIBUTES SPECIALMETHODStATTRIBUTEMETHODSscallable-typessCALLS SPECIALMETHODStCALLABLEMETHODSssequence-typess)SEQUENCES SEQUENCEMETHODS2 SPECIALMETHODStSEQUENCEMETHODS1ssequence-methodss)SEQUENCES SEQUENCEMETHODS1 SPECIALMETHODSsMAPPINGS SPECIALMETHODStMAPPINGMETHODSs numeric-typess*NUMBERS AUGMENTEDASSIGNMENT SPECIALMETHODSt NUMBERMETHODSt execmodels%NAMESPACES DYNAMICFEATURES EXCEPTIONSt EXECUTIONtnamings*global ASSIGNMENT DELETION DYNAMICFEATURESsdynamic-featurestDYNAMICFEATUREStSCOPINGtFRAMESRstry except finally raisescoercion-rulest CONVERSIONSt COERCIONSt conversionst identifiersskeywords SPECIALIDENTIFIERSt IDENTIFIERSs id-classestSPECIALIDENTIFIERSsatom-identifierss atom-literalssHSTRINGS BACKQUOTES NUMBERS TUPLELITERALS LISTLITERALS DICTIONARYLITERALStLITERALStTUPLESt exprlistssTUPLES LITERALSt TUPLELITERALSstypesseq-mutablet LISTLITERALStLISTStlistssLISTS LITERALSt typesmappingtDICTIONARYLITERALSRsDICTIONARIES LITERALSsstring-conversionssrepr str STRINGS LITERALSsattribute-referencess(getattr hasattr setattr ATTRIBUTEMETHODSt ATTRIBUTESt subscriptionst SUBSCRIPTStslicingstcallstCALLStpowertunarytbinarytBINARYtshiftingtSHIFTINGtbitwiset comparisonssEXPRESSIONS BASICMETHODStbooleanssEXPRESSIONS TRUTHVALUEt ASSERTIONt assignmentt ASSIGNMENTt augassigntDELETIONtPRINTINGt RETURNINGt IMPORTINGt CONDITIONALtcompoundsfor while break continuetLOOPINGttruths if while and or not BASICMETHODStdebuggertpdbt DEBUGGINGscontext-managerstCONTEXTMANAGERScCs||_||_dS(N(t_inputt_output(R tinputtoutput((s/usr/lib64/python2.7/pydoc.pyRis cCs|jptjS(N(RkRR(R ((s/usr/lib64/python2.7/pydoc.pyRscCs|jptjS(N(RlRR(R ((s/usr/lib64/python2.7/pydoc.pyRscCs)tjdddkr%|dSdS(Niit?Rs(Rtstack(R ((s/usr/lib64/python2.7/pydoc.pyt__repr__scCsG||jk r|j|n$|j|j|jjddS(Ns You are now leaving help and returning to the Python interpreter. If you want to ask for help on a particular object directly from the interpreter, you can type "help(object)". Executing "help('string')" has the same effect as typing a particular string at the help> prompt. (t_GoInteractivethelptintrotinteractRnR(R trequest((s/usr/lib64/python2.7/pydoc.pyROs    cCs|jjdxtry|jd}|s5PnWnttfk rPPnXtt|dddd}t|dkrPn|j |qWdS( Ns shelp> RRRRtquit(Rsquit( RnRRktgetlinetKeyboardInterrupttEOFErrorRR5RRs(R Rv((s/usr/lib64/python2.7/pydoc.pyRus cCsJ|jtjkrt|S|jj||jj|jjSdS(s.Read one line, using raw_input when available.N(RmRRt raw_inputRnRRRp(R tprompt((s/usr/lib64/python2.7/pydoc.pyRxs   cCs{t|tdkrA|j}|dkr=|jqg|dkrV|jqg|dkro|jqg|dkr|jqg|dkr|jqg|d dkr|jt|d qg||jkr|j |qg||j kr |j |qg||j kr(|j |qg|rgt |d qgn&t|trZ|n t |d |jjd dS( NRRstkeywordstsymbolsttopicsRismodules is Help on %s:s (RRRtt listkeywordst listsymbolst listtopicst listmodulesRR~t showsymbolR}t showtopicRR&RRRnR(R Rv((s/usr/lib64/python2.7/pydoc.pyRss4        cCs,|jjdttjd gddS(Ns Welcome to Python %s! This is the online help utility. If this is your first time using Python, you should definitely check out the tutorial on the Internet at http://docs.python.org/%s/tutorial/. Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To quit this help utility and return to the interpreter, just type "quit". To get a list of available modules, keywords, or topics, type "modules", "keywords", or "topics". Each module also comes with a one-line summary of what it does; to list the modules whose summaries contain a given word such as "spam", type "modules spam". ii(RnRttupleRR(R ((s/usr/lib64/python2.7/pydoc.pyRts iiPc Cs|}|j||}t||d|}xt|D]}xt|D]z}|||}|t|krS|jj||||dkr|jjdd|dt||qqSqSW|jjdq@WdS(NiRs (R2R%RRnR( R titemstcolumnsRtcolwRtrowRR((s/usr/lib64/python2.7/pydoc.pyRs  4cCs*|jjd|j|jjdS(NsN Here is a list of the Python keywords. Enter any keyword to get more help. (RnRRR}RE(R ((s/usr/lib64/python2.7/pydoc.pyR"s cCs*|jjd|j|jjdS(Nsx Here is a list of the punctuation symbols which Python assigns special meaning to. Enter any symbol to get more help. (RnRRR~RE(R ((s/usr/lib64/python2.7/pydoc.pyR)s cCs*|jjd|j|jjdS(NsN Here is a list of available topics. Enter any topic name to get more help. (RnRRRRE(R ((s/usr/lib64/python2.7/pydoc.pyR1s c Csyddl}Wn"tk r4|jjddSX|jj||jj|}|sz|jjdt|dSt|tdkr|j ||S|\}}y|jj|}Wn,t k r|jjdt|dSXt t |d|r"|pdd|}n|rddl }ddl} |j } | j| jdtt|dd|jjd | jndS( Nist Sorry, topic and keyword documentation is not available because the module "pydoc_data.topics" could not be found. sno documentation found for %s Rs RsRelated help topics: s, s %s (tpydoc_data.topicsRRnRRRxR}RRRtKeyErrorRRtStringIOt formattert DumbWritertsend_flowing_dataRRtgetvalue( R ttopict more_xrefst pydoc_datattargettlabeltxrefsR&RRtbuffer((s/usr/lib64/python2.7/pydoc.pyR8s6  !   cCs9|j|}|jd\}}}|j||dS(NR(R~t partitionR(R tsymbolRRRYR((s/usr/lib64/python2.7/pydoc.pyRXs cs|r#|jjdt|nj|jjdi}|dfd}tjd||j|j|jjddS(NsO Here is a list of matching modules. Enter any module name to get more help. sI Please wait a moment while I gather a list of all available modules... cSsM|r'|ddkr'|d d}nt|ddkrId||>RRRRRRs<=s>=s==s!=s<>(RRs<=s>=s==s!=s<>(RQR( s+=s-=s*=s/=s%=s&=s|=s^=s<<=s>>=s**=s//=(s<>RRRR(RR(stypessRSTRINGS UNICODE NUMBERS SEQUENCES MAPPINGS FUNCTIONS CLASSES MODULES FILES inspect(R s4str UNICODE SEQUENCES STRINGMETHODS FORMATTING TYPES(sstring-methodssSTRINGS FORMATTING(RR(R s:encodings unicode SEQUENCES STRINGMETHODS FORMATTING TYPES(RsINTEGER FLOAT COMPLEX TYPES(Rs int range(Rs float math(Rs complex cmath(Rs%STRINGMETHODS FORMATTING xrange LISTS(Rs def TYPES(Rsclass def CLASSES TYPES(sbltin-code-objectsscompile FUNCTIONS TYPES(sbltin-type-objectss types TYPES(sbltin-null-objectR(sbltin-ellipsis-objectR%(sbltin-file-objectsR(R'R(stypess!class SPECIALMETHODS PRIVATENAMES(R)R(soperator-summaryslambda or and not in is BOOLEAN COMPARISON BITWISE SHIFTING BINARY FORMATTING POWER UNARY ATTRIBUTES SUBSCRIPTS SLICINGS CALLS TUPLES LISTS DICTIONARIES BACKQUOTES(R-R (R/stBASICMETHODS ATTRIBUTEMETHODS CALLABLEMETHODS SEQUENCEMETHODS1 MAPPINGMETHODS SEQUENCEMETHODS2 NUMBERMETHODS CLASSES(R1s cmp hash repr str SPECIALMETHODS(sattribute-accesssATTRIBUTES SPECIALMETHODS(scallable-typessCALLS SPECIALMETHODS(ssequence-typess)SEQUENCES SEQUENCEMETHODS2 SPECIALMETHODS(ssequence-methodss)SEQUENCES SEQUENCEMETHODS1 SPECIALMETHODS(ssequence-typessMAPPINGS SPECIALMETHODS(s numeric-typess*NUMBERS AUGMENTEDASSIGNMENT SPECIALMETHODS(R7s%NAMESPACES DYNAMICFEATURES EXCEPTIONS(R9s*global ASSIGNMENT DELETION DYNAMICFEATURES(sdynamic-featuresR(s exceptionsstry except finally raise(scoercion-rulesR=(R?R>(R@skeywords SPECIALIDENTIFIERS(s id-classesR(satom-identifiersR(s atom-literalssHSTRINGS BACKQUOTES NUMBERS TUPLELITERALS LISTLITERALS DICTIONARYLITERALS(REsTUPLES LITERALS(stypesseq-mutableRG(RIsLISTS LITERALS(RJRK(sdictsDICTIONARIES LITERALS(sstring-conversionssrepr str STRINGS LITERALS(sattribute-referencess(getattr hasattr setattr ATTRIBUTEMETHODS(RMR4(ROR(RPR+(RRR+(RSR+(RTR+(RVR+(RXR+(RYsEXPRESSIONS BASICMETHODS(RZsEXPRESSIONS TRUTHVALUE(R\R(R^R6(Rdsfor while break continue(Rfs if while and or not BASICMETHODS(RgRh(scontext-managersRN(RRR}t_symbols_inverseR~t iteritemsRtsymbols_RRxRR^RiRRmRnRqR#RrRORuRxRsRtRRRRRRR(((s/usr/lib64/python2.7/pydoc.pyRs@               tScannercBs eZdZdZdZRS(sA generic tree iterator.cCs)||_g|_||_||_dS(N(trootststatetchildrentdescendp(R RRR((s/usr/lib64/python2.7/pydoc.pyRi|s   cCs|jsF|jsdS|jjd}||j|fg|_n|jd\}}|sv|jj|jS|jd}|j|r|jj||j|fn|S(Nii(RRR^R RtnextRR(R troottnodeRtchild((s/usr/lib64/python2.7/pydoc.pyRs    "(RRRSRiR(((s/usr/lib64/python2.7/pydoc.pyRzs RcBs eZdZddddZRS(s7An interruptible scanner that searches module synopses.cCs|rt|}nt|_i}xtjD]}|dkr.d||<|dkri|d|dqtt|jp~ddd}t t|d||dkr|d||qq.q.Wx7t j d|D]#\}}} |jrPn|dkr|d|dq|j |} t | drd dl} t| j| j|pad}t | d r| j|} qd} n:| j|} | jpdjd}t| d d} t t|d||dkr|| ||qqW|r|ndS( Nt__main__iRs is - Rt get_sourceit get_filenameRT(RRlRwRRR^RRRSRR0Rt find_moduleR]RRsRRR}R~RF(R RRIt completerRtseenR)RR>R?tloaderRRR((s/usr/lib64/python2.7/pydoc.pyRsB    "#"    #N(RRRSR^R(((s/usr/lib64/python2.7/pydoc.pyRsc CsOd}d}tj+tjdtj||d|WdQXdS(sAPrint all the one-line module summaries that contain a substring.cSs8|ddkr!|d d}n|G|o2d|GHdS(Nis .__init__s (package)s- ((RR)R((s/usr/lib64/python2.7/pydoc.pyRscSsdS(N((R)((s/usr/lib64/python2.7/pydoc.pyRstignoreRN(twarningstcatch_warningstfilterwarningsRR(RIRR((s/usr/lib64/python2.7/pydoc.pyRs     c Csddl}ddl}ddl}d|jfdY}d|jfdY}d|jfdY}|j|_||_||_z8y|||j Wnt |j fk rnXWd|r|nXdS(NitMessagecBseZddZRS(icSsf|j}|jdjdj||||jd|_|jd|_|j|jdS(Niscontent-transfer-encodings content-type(RRBRit getheadertencodingheadert typeheadert parsetypet parseplist(R tfptseekableR((s/usr/lib64/python2.7/pydoc.pyRis  ! (RRRi(((s/usr/lib64/python2.7/pydoc.pyRst DocHandlercBs#eZdZdZdZRS(cSs_yG|jd|jdd|j|jjtj||Wntk rZnXdS(Nis Content-Types text/html(t send_responset send_headert end_headerstwfileRRRR{(R RR((s/usr/lib64/python2.7/pydoc.pyt send_documents    c Ss|j}|ddkr&|d }n|d dkrC|d}n|r|dkryt|dd}Wn3tk r}|j|tjt|dSX|r|jt|tj||q|j|dt |ntj dd d }d }t d t j }tj||}d tjdd d|g}i} x*t jD]} |jtj| | q]W|t|d}|jd|dS(Nis.htmliRRRs$no Python documentation found for %ss?Python: Index of Moduless#ffffffs#7799eecSsd||fS(Ns%s((R*((s/usr/lib64/python2.7/pydoc.pyt bltinlinkscSs |dkS(NR((RP((s/usr/lib64/python2.7/pydoc.pyRss

sBuilt-in Moduless#ee77aas

pydoc by Ka-Ping Yee <ping@lfw.org>sIndex of Modules(RRRRRRR+RRRRRYRRRRRRrR( R RR?RJRRtnamesRtindicesRR((s/usr/lib64/python2.7/pydoc.pytdo_GETs<   %       cWsdS(N((R R((s/usr/lib64/python2.7/pydoc.pyt log_messages(RRRRR(((s/usr/lib64/python2.7/pydoc.pyRs  #t DocServercBs#eZdZdZdZRS(cSsQd}||f|_d||f|_||_|jj||j|jdS(Nt localhosts http://%s:%d/(taddressRRRKRithandler(R tportRthost((s/usr/lib64/python2.7/pydoc.pyRis  cSsiddl}t|_xM|jsd|j|jjgggd\}}}|r|jqqWdS(Nii(tselectRlRwtsocketRthandle_request(R Rtrdtwrtex((s/usr/lib64/python2.7/pydoc.pytserve_until_quits    -cSs-|jj||jr)|j|ndS(N(RKtserver_activateR(R ((s/usr/lib64/python2.7/pydoc.pyRs (RRRiRR(((s/usr/lib64/python2.7/pydoc.pyRs  ( tBaseHTTPServert mimetoolsRRtBaseHTTPRequestHandlert HTTPServerRKRt MessageClassRRyterror( RRRRRRRRR((s/usr/lib64/python2.7/pydoc.pytserves$ .   cCsodddY}ddl}y8|j}z||}|jWd|jXWntk rjnXdS(sEGraphical interface (starts web server and pops up a control window).tGUIcBseZddZdZdddZddZddZdZddZ dZ dd Z dd Z d Z d Zdd ZRS(i(c Ss||_d|_d|_ddl}|j||_|j|jdd|_|j |jddd|j dd|_ |j |jddd|j dd|_ |j||_|j|jdd |_|j|j|_|jjd |j|j |jdd d d d|jdd|_tjdkrU|jjddn|jjd|jjd|j |jjdddd|j jdddddd|j jdddddd|jjdddd|jjdd|jjdddddd|jjdddd|jjdtjdkr[dp^df}|j|d|dd|_|jjd|j|jjd |j|j |d!d"d|jj!|_"|jj#d#|j"j$|j||_%|j |j%dd$d|j|_&|j |j%dd%d|j'|_(|j&jdddddd|j(jdddddd|jj)|jj*|_+|jj,|_-|jj.|jj.|jj.|j%j.|_/|j+|j/|_0|_1d |_2|jj3d&|j+|j-f|jj4|j+|j-|jj5j6ddl7}|j8d't9d(||j:|j fj;dS()NiR3sStarting server... s open browsertcommandRtdisableds quit servings Search forststoptpadyiRtsidetrighttpydoctWM_DELETE_WINDOWttoptfillRPtlefttexpandit helveticaii tfonttheightis storienttverticaltyscrollcommandsgo to selecteds hide resultss%dx%dRR(<twindowR^tservertscannertTkintertFramet server_frmtLabelt title_lbltButtonRztopen_btnRwtquit_btnt search_frmt search_lbltEntryt search_enttbindRRtstop_btnRR(tpackRtprotocolt focus_settListboxt result_lstRtgotot Scrollbartyviewt result_scrtconfigRt result_frmtgoto_btnthidethide_btnRCt winfo_widthtminwidtht winfo_heightt minheighttwinfo_reqheightt bigminheighttbigwidtht bigheighttexpandedt wm_geometryt wm_minsizettkt willdispatcht threadingtThreadRtreadyR (R RRRRR((s/usr/lib64/python2.7/pydoc.pyRi*sp     ! !  &    cSsM||_|jjdd|j|jjdd|jjdddS(NR3sPython documentation server at Rtnormal(RRR RRR(R R((s/usr/lib64/python2.7/pydoc.pyR os   cSs|p|jj}yddl}|j|Wnatk rtjdkrbtjd|qtjd|}|rtjd|qnXdS(NiRs start "%s"s netscape -remote "openURL(%s)" &snetscape "%s" &( RRt webbrowserRzRRR(RR(R teventRR"trc((s/usr/lib64/python2.7/pydoc.pyRzvs  cSs)|jrd|j_n|jjdS(Ni(RRwR(R R#((s/usr/lib64/python2.7/pydoc.pyRws cSs|jj}|jjdd|jjdd|jjdd||jj|jjdd|jjdd |j jdd |j d dl }|j rd |j _ nt|_ |jd |j jd|j||jfjdS(NRRRR!R3sSearching for "%s"...RiR RiiRR(RRxRRR RtforgetRtdeleteRRRRRwRRRRCRR (R R#RIR((s/usr/lib64/python2.7/pydoc.pyRs     cSsF|ddkr!|d d}n|jjd|d|p=ddS(Nis .__init__s (package)R s - s(no description)(Rtinsert(R RR)R((s/usr/lib64/python2.7/pydoc.pyRCs cSs%|jr!d|j_d|_ndS(Ni(RRwR^(R R#((s/usr/lib64/python2.7/pydoc.pyRs  cSsd|_|jjdd|jjdd|jjdddddd tjd krm|jj n|jjd d dS( NR3s Search forRRRRRPRiRRR( R^RRR RRRR(RR%(R ((s/usr/lib64/python2.7/pydoc.pyRs cSs|jjdddS(NRR!(RR (R R#((s/usr/lib64/python2.7/pydoc.pyRscSsZ|jj}|rVt|jj|dd}|jd|jj|dndS(NiRs.html(Rt curselectionRRxRzRR(R R#t selectionR)((s/usr/lib64/python2.7/pydoc.pyRs cSs|js dS|jj|jj|jj|jj|_|jj|_ |jj d|j |j f|jj |j |j d|_dS(Ns%dx%di(RR R%R RRRRRRRRRR(R ((s/usr/lib64/python2.7/pydoc.pytcollapses     cSs|jr dS|jjdddd|jjdddd|jjddddd d |jjd |j|jf|jj |j |j d |_dS( NRtbottomRRPRtyRtbothRis%dx%d( RR RR RRRRRRRR(R ((s/usr/lib64/python2.7/pydoc.pyRs  cSs|j|jdS(N(RR*(R R#((s/usr/lib64/python2.7/pydoc.pyRs N(RRRiR R^RzRwRRCRRRRR*RR(((s/usr/lib64/python2.7/pydoc.pyR)s E         iN((RtTktmainlooptdestroyRy(RRRtgui((s/usr/lib64/python2.7/pydoc.pyR1's    cCs%t|to$t|tjdkS(Ni(RR+RRtsep(RP((s/usr/lib64/python2.7/pydoc.pytispathscCsddl}dddY}dtjkrtjjtjd}|tjkritjj|ntjjddny|jtjdd \}}d}x|D]\}}|d krt|dS|d kr0yt |}Wnt k r |nXd } d } t || | dS|dkrd}qqW|sX|nx|D]} t | rtjj |  rd| GHPny|t | rtjj| rt| } n|rt | rtjj| rt| q t| n tj| Wq_tk r'} | GHq_Xq_WWnT|j|fk rtjjtjd} d| tj| | | tjfGHnXdS(s@Command-line interface (looks at sys.argv to decide what to do).iNtBadUsagecBseZRS((RR(((s/usr/lib64/python2.7/pydoc.pyR4sRiRisgk:p:ws-ks-pcSsd|jGHdS(Nspydoc server ready at %s(R(R((s/usr/lib64/python2.7/pydoc.pyR scSs dGHdS(Nspydoc server stopped((((s/usr/lib64/python2.7/pydoc.pytstoppedss-wsfile %r does not existscpydoc - the Python documentation tool %s ... Show text documentation on something. may be the name of a Python keyword, topic, function, module, or package, or a dotted reference to a class or function within a module or module in a package. If contains a '%s', it is used as the path to a Python source file to document. If name is 'keywords', 'topics', or 'modules', a listing of these things is displayed. %s -k Search for a keyword in the synopsis lines of all available modules. %s -p Start an HTTP server on the given port on the local machine. %s -w ... Write out the HTML documentation for a module to a file in the current directory. If contains a '%s', it is treated as a filename; if it names a directory, documentation is written for all the contents. ((tgetoptRRRtdirnametargvtremoveR'RRt ValueErrorRR3texistsRjRRRRRsRRRR2(R6R4t scriptdirtoptsRtwritingtopttvalRR R5targRJR((s/usr/lib64/python2.7/pydoc.pytclisX               R(YRSR#RRR%RR|RR!RRRZR0RRRtstringRRRRRRRRt tracebackR t collectionsR RRRRR(R+R2R5R:Rt IGNORECASER;R<R@RDRQR^RaRhRnRsRRERRRRRRRtRuRRRRRRRRRR3RRRRRRR&RRRRsRRRRR1R3RBR(((s/usr/lib64/python2.7/pydoc.pyt s l:             28* Y    &       i , [  M