fdZdgZdZdZdZddlZddlZddlZddl Zddl Zddl Zddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlmZddlmZdd lmZd Zd Z d Z!d Z"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*ej+dej,Z-dZ.dZ/dZ0dZ1e2ej3Z4dTdZ5dZ6dZ7dZ8dZ9ifd Z:Gd!d"e;ZGd%d&Z?Gd'd(eZ@Gd)d*e?ZAGd+d,eZBGd-d.e?ZCGd/d0eCZDd1aEd2ZFd3ZGd4ZHd5ZId6ZJd7ZKd8ZLd9ZMdUd:ZNeCZOeDZPeAZQdUd;ZR dVd=ZS dWd?ZTdUd@ZUdXdBZVGdCdDZWeWZXGdEdFZYdGZZdHZ[dYdJZ\dUdKdLdMdNZ]dOZ^dPZ_dQZ`dRZaebdSkr eadSdS)ZaGenerate Python documentation in HTML or text for interactive use. At the Python interactive prompt, calling help(thing) on a Python object documents the object, and calling help() starts up an interactive help session. 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 -n " to start an HTTP server with the given hostname (default: localhost) on the local machine. Run "pydoc -p " to start an HTTP server on the given port on the local machine. Port number 0 can be used to get an arbitrary unused port. Run "pydoc -b" to start an HTTP server on an arbitrary unused port and open a web browser to interactively browse documentation. Combine with the -n and -p options to control the hostname and port used. 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 https://docs.python.org/X.Y/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. helpzKa-Ping Yee z26 February 2001zGuido 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. N)deque)Repr)format_exception_onlycFg}g}tjD]}tj|pd}tj|}||vrItj|r*|||||S)zAConvert sys.path into a list of absolute, existing, unique paths..)syspathosabspathnormcaseisdirappend)dirsnormdirsdirnormdirs ,/opt/alt/python311/lib64/python3.11/pydoc.pypathdirsrRs DHx%%goocjS))'""3'' ( " "rw}}S'9'9 " KK    OOG $ $ $ Kctj|j}|dS|jdddD]}t ||}tj|sdS|S)Nr) r modulesget __module__ __qualname__splitgetattrinspectisclass)funcclsnames r _findclassr$^sw +//$/ * *C {t!'',,SbS1!!c4   ?3  t JrcJtj|rZ|jj}|j}tj|r*t t ||dd|jur|}n~|j}nutj|r.|j}t|}|t |||urdSn3tj |rC|j}|j}tj|r|j dz|z|j kr|}n|j}nt|tr4|j}|j}t|}|t |||urdSntj|stj|ri|j}|j}t |||urdStj|r2t |dd}t|t&r ||vr||SndS|jD]7} t+t ||}n#t,$rY-wxYw||cS8dS)N__func__r __slots__)rismethodr&__name____self__r r __class__ isfunctionr$ isbuiltinr isinstancepropertyfgetismethoddescriptorisdatadescriptor __objclass__ismemberdescriptordict__mro__ _getowndocAttributeError)objr#selfr"r!slotsbasedocs r_finddocr>hsd(|$| OD ! ! ! GD$--z : :cl J JCC.CC  C |oo ;'#t,,C7748  3  || OD ! ! !   #d *c.> > >CC.CC C " "x} ;'#t,,C7748  #C ( ( G,DS,I,I | 3  S ( (4  %c * * #Cd33E%&& #45==T{"t  WT40011CC    H  ?JJJ  4s.H  HHc t|d}|dS|tur1t|j}t |t r||krdS|S#t $rYdSwxYw)zUGet the documentation string for an object if it is not inherited from its class.__doc__N)object__getattribute__typer@r.strr8)r9r=typedocs rr7r7s %%c955 ;4 d??3ii'G'3'' GsNNt ttsA8AA A+*A+ct|}|) t|}n#ttf$rYdSwxYwt |t sdSt j|S)zGet the documentation string for an object. All tabs are expanded to spaces. To clean up docstrings that are indented to line up with blocks of code, any whitespace than can be uniformly removed from the second line onwards is removed.N)r7r>r8 TypeErrorr.rDrcleandoc)rAr=s r_getdocrIsy V  C { 6""CC *   44  c3  t  C  s #88ct|ptj|}|r(tjdd|pdS)z-Get the doc string or comments for an object.z^ * )rIr getcommentsresubrstrip)rAresults rgetdocrQsC V__ ; 3F ; ;F  :bfWb&--//:: @b@rc\|d}t|dkr |ddfSt|dkr?|ds%|dd|ddfSdd|fS)z>Split a doc string into a synopsis line (if any) and the rest. rrKN)striprlenrOjoin)r=liness rsplitdocrZs IIKK  d # #E 5zzQQx| Uqq!2!2Qx59---- tyy rcD|j}|j|kr |jdz|z}|S)z@Get a class name and qualify it with a module name if necessary.r)r)rrAmodnamer#s r classnamer^s. ?D G## 3&- Krcd|jvr:|jdd}|j|kr |jdz|zS|S|j|kr|jSdS)z_Get a name of the enclosing class (qualified it with a module name if necessary) or module.rrN)r rpartitionrr\s r parentnamerasr f!!!"--c2215   ' '$s*T1 1K   ' '$ $ ( 'rctj|pctj|pOtj|p;tj|p'tj|ptj| S)z>Check if an object is of a type that probably means it's data.)rismoduler isroutineisframe istracebackiscode)rAs risdatarhs| ((FGOF,C,CF!&))F-4_V-D-DF#F++F/6~f/E/E GGrc|r@|d||d}|dd}|@|S)z/Do a series of global replacements on a string.rTrrUN)rXr)textpairss rreplacerlsM Qx}}TZZa1122abb   Krct||krTtd|dz dz}td|dz |z }|d|dz|t||z dzS|S)zCOmit part of a string if needed to make it fit in a maximum length.rrUN...)rWmax)rjmaxlenpreposts rcramrtsq 4yy6!fQh]##1fQhsl##DSDzE!DT4$999 Krz at 0x[0-9a-f]{6,16}(>+)$c8td|S)z>Remove the hexadecimal id from a Python object representation.z\1) _re_stripidrNrjs rstripidrxs ??5$ ' ''rctj|rdStj|r*t|dd}tj|p|du SdS)zo Returns True if fn is a bound method, regardless of whether fn was implemented in Python or in C. Tr*NF)rr(r-rrc)fnr:s r_is_bound_methodr{sb t>r:t,,$T**?? U  ))z$''((((||~~((r3'' Nrcg}g}|D]8}||r||#||9||fS)zSplit sequence s via predicate, and return pair ([true], [false]). The return value is a 2-tuple of lists, ([x for x in s if predicate(x)], [x for x in s if not predicate(x)]) r)s predicateyesnoxs r _split_listrsX C B  9Q<<  JJqMMMM IIaLLLL 7Nrcf|dvrdS|dr|drdS|drt|drdS|tur4|tvr+t t ||dtjrd S|||vS|d S) z3Decide whether to show documentation on a variable.>r@__date____file__r)__path____spec__r' __author__ __cached__ __loader__r __credits__ __package__ __version__ __builtins__rr__rT__fieldsTNF) startswithendswithhasattr __future___future_feature_namesr.r_Feature)r#allr9s r visiblenamer!s HHHq t>t!4!4>QQ sY 7 7t *)>!>!> gc4.. 0C D D 5 s{??3''''rc g}tj|D]l\}}}}tj|r!d}t|tr |jd}n|dkrt |rd}|||||fm|S)zUWrap inspect.classify_class_attrs, with fixup for data descriptors and bound methods.data descriptorNreadonly propertymethod static method)rclassify_class_attrsr2r.r/fsetr{r)rAresultsr#kindr"rs rrr9sG$+$@$H$H11 tS%  #E * * #$D%** +uz/A* X  "25"9"9 "DdC/0000 Nrct|dg fdtDn#t$riYnwxYwfd}||dS)zGSort the attrs list in-place by _fields and then alphabetically by namerc<i|]\}}||tz S)rW).0ir#fieldss r z#sort_attributes..Ls)OOO DtaF mOOOrcL|dd|dfSNr)r)attr field_orders rz!sort_attributes..Os"KOODGQ77aArrN)r enumeraterGsort)attrsrAkeyfuncrrs @@rsort_attributesrFsVY + +FOOOOYv=N=NOOO  AAAAG JJ7Js1 AActj|rHdD]E}tjtj|d|zrdSFdS)z3Guess whether a path refers to a package directory.)z.pyz.pyc__init__TF)r r risfilerX)r exts r ispackagerTsc w}}T"  Cw~~bgll4c1ABBCC tt  5rcz|}|dddks|s9|}|sn"|dddk%|9|}|dddkr |dd}|dddkr|dd}|dddkr |dd}|s+|}|sn|+|dd }nd}|S) NrT#zr"""rn"""r\r)readlinerVr)filelinerPs rsource_synopsisr\s4 ==??D rr(c///}}U rr(c/// ::<99*hAG:IID "-33D99 tt J'7=~OV^..00334F &/h Ms0C C*)C*/D  DDE&&E+ceZdZdZdZdZdS)ErrorDuringImportzEErrors that occurred while trying to import something to document it.c>||_|\|_|_|_dSN)rexcrtb)r:rexc_infos rrzErrorDuringImport.__init__s  (0%$*dgggrcD|jj}d|jd|d|jS)Nz problem in  - z: )rr)rr)r:rs r__str__zErrorDuringImport.__str__s)h+/===###tzzJJrN)r)rrr@rrrrrrrs=OO111KKKKKrrctjj}t|d5}||t |k}dddn #1swxYwYt j|}t j |\}}|r!tj ||}n tj ||}tj |||} tj|S#t!|t#jxYw)z 1 1$V 1 L LD6#))$///6clnn555s'AAAD&&#E c |r_tjvrQtjvrCfdtjD}g|zD]$}tj|||<tj|=%t}n#tjx\}}}} tjvr%t tjj| |turt |j| t|tr|j krYdSt tjxYw dddD]$} t|| }#t$rYdSwxYw|S)aImport a module; handle errors; return None if the module isn't found. If the module *is* found but an exception occurs, it's wrapped in an ErrorDuringImport exception and reraised. Unlike __import__, if a package path is specified, the module at the end of the path is returned, not the package at the beginning. If the optional 'forceload' argument is 1, we reload the module from disk (unless it's a dynamic extension).cDg|]}|dz|S)r)r)rmr s r zsafeimport..s.KKKa!,,tcz2J2JKKKKrNrrT)r rbuiltin_module_names __import__rrr SyntaxErrorr issubclass ImportErrorr#rrr8) r forceloadrsubsrrrrrinfoparts ` r safeimportrs :  ),,3333 LKKK3;KKK 6D=))C!$S!1E#J C((D!!:"%,..0eR4 3;  #CK$5$>EE E K  #END99 9 [ ) ) :ejD.@.@44$D#,..99 9 3#++fd++VV***dddd* Ms%A0A44B D$!D$E E&%E&ceZdZejddejddzZd dZ d dZ e xZ xZ xZ xZxZZejdfdZdS) Doc PYTHONDOCSz%https://docs.python.org/%d.%d/libraryNrUc8||f|z} tj|r |j|Stj|r |j|Stj|r |j|Sn#t$rYnwxYwtj|r |j |S|j |S)z%Generate documentation for an object.) rrc docmoduler docclassrd docroutiner8r2docdatadocother)r:rAr#argss rdocumentz Doc.documents~$  '' E0E)Ev&& C}t}d/C(C (( G$1G*G G    D   #F + +GLDL$4G-Gt}d##sA$A$A$$ A10A1cxd|odt|zdt|j}t|)z+Raise an exception for unimplemented types.z!don't know how to document object z of type )reprrCr)rG)r:rAr#rmessages rfailzDoc.failsB  %S4::% % %tF||'<'<>   rstdlibc tj|}n#t$rd}YnwxYwtjd|j}tj|}t|ttr|j dvsH| |r| tj |ds|j dvr| drAd|d|j }n=tj ||j d z}nd }|S) z*Return the location of module docs or None (built-in)r) errno exceptionsgcimpmarshalposixsignalr _thread zipimportz site-packages)z xml.etreeztest.test_pydoc.pydoc_mod)zhttp://zhttps://z {}/{}.html/.htmlN)r getabsfilerGr environrrr r r.rCr)rrXformatrOlower)r:rAbasedirrdoclocs r getdoclocz Doc.getdoclocs` %f--DD   DDD  do>>'""7++ vtBxx ( (  _!999oog&&9//"',,w"H"HII 9 O#M M M  !899 Q%,,V]]3-?-?AVAVAXAXYYffo.C.C.E.E.OPPF s  &&r)r)rrr r/rr version_inforrrrrrr docpropertyr sysconfigget_pathr4rrrrrs G"%"22A2"6!788J$$$$ !!!! LPOIOO:OO;(: (:8(D(Drrc>eZdZdZdZdZdZdZdZeZ dZ eZ dS) HTMLReprzBClass for safely making an HTML representation of a Python object.cttj|dx|_|_d|_dx|_|_dSN drrmaxlistmaxtuplemaxdict maxstringmaxotherr:s rrzHTMLRepr.__init__9 d')) t} ),,rc ,t|ddddddS)N&z&z>)rlr:rjs rescapezHTMLRepr.escape"stS'3VDDDrc,tj||Sr)rrr:rAs rrz HTMLRepr.repr%syv&&&rc tt|drfddt|jz}t||rt ||||S|ttt||j SNr)repr_r) rrCrXr)rrrMrtrxrrEr:rlevel methodnames rrepr1zHTMLRepr.repr1(s 477J ' ' ; 388DGG,<,B,B,D,D#E#EEJtZ(( ;0wtZ00E:::{{4Q 0 0$-@@AAArct||j}t|}d|vr=dt|ddvr*d|dz||z|dzSt jdd||S)Nr\\rKrrz-((\\[\\abfnrtv\'"]|\\[0-9]..|\\x..|\\u....)+)z\1)rtrDrrlrMrMrNr:rrTtesttestreprs r repr_stringzHTMLRepr.repr_string/sAt~&&:: 4<)rMrtrxrrDr+r)r:rrTs r repr_instancezHTMLRepr.repr_instance<s` G;;tGDGG$4$4dnEEFF F G;;1EEFF F F Fs AA$A*N) r)rrr@rrMrrVr]repr_strra repr_unicoderrrr:r:sLL--- EEE'''BBB - - -HGGG LLLrr:ceZdZdZeZejZejZdZddZ ddZ d Z d Z d Z d Zd ZdZdZdZdZdZdiiifdZddZddZddiifdZdZddiiiddfdZd dZeZddZddZdS)!HTMLDocz'Formatter class for HTML documentation.cd|d|dS)Format an HTML page.zN Python: z z r)r:titlecontentss rpagez HTMLDoc.pageMsUUHHH& &rrKcd|d|pddS)zFormat a page heading.zU
 
z
 z
r)r:rhextrass rheadingzHTMLDoc.headingYs$ 55&$H$$ & &rNrlc | dd|zzdz}d|d|d}|r|d|d |d |d |d |d z}n|d|d|d|d z}|d|zzS)z Format a section with a heading.Nzrlzz-

z z-decor">z
 
z
z z
z. %s
r) r:rhr"riwidthprelude marginaliagaprPs rsectionzHTMLDoc.sectionbs  .E1AAIMJ 33   NVcc:::sssGGGSSS::FF V8;ZZZNNFIHTTTrc(d|z}|j|g|RS)z$Format a section with a big heading.z&%s)rv)r:rhrs r bigsectionzHTMLDoc.bigsectionws&85@t|E)D))))rc ~||}t|dddddddd S)z!Format literal preformatted text. z rrlrS
)rM expandtabsrlrLs r preformatzHTMLDoc.preformat|sB{{4??,,--tVWfg (D(<< r{rqz%s
)rWrange)r:listr0rProwscolrs r multicolumnzHTMLDoc.multicolumnsD A !#88 & &C88F48T#Xd]33 A As4yy==#ffT!Woo5@Fg%FF+f44rc d|zS)Nz%srrLs rgreyz HTMLDoc.greys !?$!FFrc:|D]}||vrd||d|dcS|S)z:Make a link for an identifier, given name-to-URL mappings. r)r:r#dictsr5s rnamelinkzHTMLDoc.namelinksE B BDt|||04T DDDAAAA rc |jtj|j}}t ||r1t |||urd|jd|dt||dSt||S)zMake a link for a class.r.html#rr)r)r rrrrrr^)r:rAr]r#rs r classlinkzHTMLDoc.classlinks 8I(J(Jf 64  CWVT%:%:f%D%D%Dy'A'A'A'AC C)))rcd}|jtj|j}}t ||rnt |||ur\d|jvr>|jdd}|j|kr |jd|}nd|z}n|j|kr d|jz}|rd|dt||d St||S) z.Make a link for the enclosing class or module.Nrrrz#%s%s.htmlrrr) r)r rrrrrrr`ra)r:rAr]linkr#rs r parentlinkzHTMLDoc.parentlinks 8I(J(Jf 64 7WVT%:%:f%D%Df)))*55c::1=$//+1???DDADD 4r)r)rOs r modulelinkzHTMLDoc.modulelinks-3___foooNNrc|\}}}}|r||S|r |d|d}nd|z}|rd|z}n|}d|d|dS)z;Make a link for a module or package to display in an index.rr-rz"%s (package)rrr)r)r: modpkginfor#r rshadowedurlrjs r modpkglinkzHTMLDoc.modpkglinks{*4'dIx  #99T?? "  #"&$$-CCd"C  7$>DDD(+TTT22rcd|d|dS)zMake a link to source file.z%sNrK) rMrMcompilesearchspanrgroupsrlintrrX)r:rjrMfuncsclassesrrherepatternmatchstartendrschemerfcpepselfdotr#rs rmarkupzHTMLDoc.markupsu&4;*344 NN4..E %JE3 NN66$tEz"233 4 4 438<<>> 0Cc7D =fSkk))#x88SSSABBBB =@3s88KVVC[[[[IJJJJ =9CHHDVVC[[[[IJJJJ =CE ?c))NN7T]]4-I-I#IJJJJNN#=#DEEEEc#a%iC''t}}T7E7KKLLLLt}}T7;;<<<D7 8 vvd455k**+++wwwrcd}|D]}t|tdur|\}}|dz}||||z}|rU||fkrNg}|D]+} ||| |,|dzd|zdz}|dz}t|tgur|d||||zz}d |zS) zAProduce HTML for a class tree as given by inspect.getclasstree().rKrz

r, )z
z
%s
z
%s
)rCrrrX formattree) r:treer]parentrPentrycbasesparentsr<s rrzHTMLDoc.formattrees ' 'EE{{d2hh&& 5"==$..G"<"<<EUvi// G %FFt~~dG'D'DEEEE#c\DIIg,>,>>DF)+eR(("3doo7A7'7'#'' 6))rc |j} |j}n#t$rd}YnwxYw|d}g}t t |dz D]B}|dd|d|dzd||dCd||ddz} d| z} tj |} tj | } | | } n#t$rd } YnwxYwg}t|d rwt!|j}|dd d kr*|ddd kr|d d}|d|zt|dr:|t!|j|r| dd|zz} |}|dt-z}nd}| d| z|z}tj|tj}gi}}tj|tjD]T\}}|tj|p||ur5t9|||r$|||fd|zx||<||<U|D]z\}}|jD]m}|j|j}}t>j !|}||kr8|r6t||r&tE|||ur||vr|dz|zx||<||<n{gi}}tj|tj#D]\}}|*tj$|stj||urOt9|||r>|||fd|z||<tj%|r ||||<g}tj|tLD]-\}}t9|||r|||f.'tQ|j)||}|od|z}|d|zz}t|drg}tUj+|j,D]\}}} |||| df |-.|j/}!|0dd|!z}n5|r3.|fd}!|0dd|!z}|rd |D}"1tj2|"d|g}!|D]1\}}|!3|||||2|0d!d"d#|!z}|rcg}!|D]1\}}|!3|||||2|0d$d%d#|!z}|r`g}!|D].\}}|!3||/|0d&d'd(|!z}t|d)rG't!|j4j)}!|0d*d+|!z}t|d,rG't!|j5j)}!|0d-d.|!z}|S)/z/Produce HTML documentation for a module object.NrrTrz.html" class="white">rr!%sr"r $Revision: $z version %srz (%s)rz-
Module ReferencerKzindex
rrz#-z%sz

%s

rrzPackage Contentsz pkg-contentc:|dSr})r)tr:s rrz#HTMLDoc.docmodule..[s4??1Q4#8#8rModulescg|]\}}|Srrrrrs rrz%HTMLDoc.docmodule..`s;;;>R!,VW_EE : :JC"5))3V>>sC00:NNC<00003c 9E#Ju! P PJC P P#}doW11d??v?'F2F?vs++t33"e||7>7IC7OOE#Jt  P2u!,VW5FGG L LJC!%(( ,3,=e,D,D,N,NsC00LLL#u...!%E#J)%00Ks%,!,VV<< * *JC3V,, * S%L)))kk&..$.%GG:4s:-#-- 6: & & 4G,3,@,Q,Q : :('5ua89999 LLNNN''AAHdoo"M8===FF  4''8888::Hdoo=(444F  8;;7;;;I 4Y B BDIIKH% O O U eS$u M MNNNNdoo7CHHX$6$6888F  >H# O O U eS$u M MNNNNdoo[#((8*<*<>>>F  9H" ; ; U eS 9 9::::doo h 7 7999F 6< ( ( L{{3v'8#9#94>JJHdooh(KKKF 6= ) ) N{{3v'9#:#:DNKKHdooiHMMMF s !!A D DDc> !j}|p|}j}g} | j G fdd} | tt j} t | dkrV d| D])}  d| j z* d fd}  fd} fd }fd tD}i|D]O\}}}}d |zd z|zx|<} t|}n#t$rYnwxYw ||<@#t$rYLwxYw|r| r| !n|d d!t|!fd\}}t jur!t jur|}]!urd}nd!j z}|dz }t%|| d|z|d}| d|z|d}| d|z|d}|d|z|d}|d|z|d}|d|z|d}|gksJ|}|d| } ||kr d|d |d!}n d"|d#|d$|d%}|rPg}|D]0} || j 1|d&d'|zz}d} t j}n#t*tf$rd(}YnwxYw|r2t-|}|r!|d)kr||zd*z}t1}|r||pdz}|j}|od+|z}|d,| d-|S).z.Produce HTML documentation for a class object.c eZdZdZfdZdS)(HTMLDoc.docclass..HorizontalRulecd|_dSrneedonerFs rrz1HTMLDoc.docclass..HorizontalRule.__init__   rc:|jr dd|_dS)Nz
rTrr:pushs rmaybez.HTMLDoc.docclass..HorizontalRule.maybe%<#DNNN  rNr)rrrrrsrHorizontalRuler= ! ! ! ! ! ! ! ! ! !rrrUz&
Method resolution order:
z
%s

c ht||\}}|r ||D]y\}}}} t |}||  |n0#t$r#|| YnwxYwdz|S)NrSrrrr Exceptionr)msgrrokr#rhomeclsrrrhrmdictrrArr:s rspillzHTMLDoc.docclass..spills#E955IB  S 24  .D$Q ' 5 5 T]]5$(-wvwPPQQQQ %===T\\%s;;<<<<<=DJJJJLsA66*B#"B#ct||\}}|rI ||D]'\}}}} || (|Srrrr rrrrr#rrrrrrr:s rspilldescriptorsz*HTMLDoc.docclass..spilldescriptorsx#E955IB 9 S 2499.D$DeT3778888Lrct||\}}|r ||D]\}}}}t||}t |} | sd|znAt |j } d| z} d|| dd|S)Nz
%s
z
%s
rrS)rrrrrQrr})rrrrr#rrrr<r=rrrrrrArr:s r spilldataz#HTMLDoc.docclass..spilldatas#E955IB  S 24  .D$==)>)>cJJD --CB0478888"kk&--*/%AA@3FddCCC@AAADJJJJLrcHg|]\}}}}t|||||fS)r9rrr#rr"rrAs rrz$HTMLDoc.docclass..L333+T4e&1113$c5)333rr-rc|duSNrUrr thisclasss rrz"HTMLDoc.docclass..AaDI z Methods %sc|ddkSNrTrrrs rrz"HTMLDoc.docclass..AaDH$4rzClass methods %sc|ddkSNrTz class methodrrs rrz"HTMLDoc.docclass..AaDN$:rzStatic methods %sc|ddkSNrTrrrs rrz"HTMLDoc.docclass..AaDO$;rzReadonly properties %sc|ddkSNrTrrrs rrz"HTMLDoc.docclass..qt7J/JrzData descriptors %sc|ddkSNrTrrrs rrz"HTMLDoc.docclass..qt7H/HrzData and other attributes %sc|ddkSNrTrrrs rrz"HTMLDoc.docclass..!rrK class zz = class r(%s)rN()rzz&%s
 
rhrn)r)rrrrgetmrorWrrrrrrrGpopleftrbuiltinsrArrX signature ValueErrorrDrMrQrr}rv)"r:rAr#rrrrrealnamerrirmror<rrrrrrrranchor inheritedtagrhrdeclr.argspecr=rrrrs"`` ``` @@@@rrzHTMLDoc.docclass|s?x  ! ! ! ! ! ! ! ! ! !^  GN6**++ s88a<< HHJJJ D: ; ; ; J J_t~~d6<6G(I(IIJJJJ DOOO            $                    $3333/CF/K/K333).   %Cw"%*s"2S"8 8E#J --      &e     !  (KKMM !!HQK *52M2M2M2MNN E9X_,,ho1M1M!f$$$)DNN9;A;L-N-NN 9 C E6 * * *E,,e4466EE,s2E::<D||E7Ha===s6D00 D=<D=E EE'K<<LLcX|d||zSz)Format an argument default value as text.=)rrrOs r formatvaluezHTMLDoc.formatvalues%yytyy000111rc |j} |p| }||}|dn|jdz|z} d} d} d} t|rj|j}||urt|dd} nt j|rd|||z} nd||j|z} n|t j|st j |rR |j }|d|||z} n0||urd |||z} n#t$rYnwxYw|} t j | rE|C| j |j ks| j|jd z| zkr|| |}|rd |z} t j|st j|rd }nd}|| kr d | d| d}nU|Ft j|| g|ur.d|jdz| zd| d}d} | d rd} n| }d | d|d|}d}t j|r\ t j|}n#t,t.f$rd}YnwxYw|r+t1|}| dkrd|z}|js |dd}|sd}||z||z| o|d| zz}| rd|zS|t;||j|||}|od|z}d|d|dS) z;Produce HTML documentation for a function or method object.NrKr Fr& class method of %s method of %s instance unbound %s method from r from %sasync r'z ">r(z
%sz
%s
z%
%s
rzr)r)r{r*rrr rr+r1ismethodwrapperr3r8r,rrriscoroutinefunctionisasyncgenfunctiongetattr_staticrrdr.r/rGrD__annotations__rMrrrQr})r:rAr#rrrrrrr0r2noteskipdocsimfuncimselfobjclasspnameasyncqualifierrhreallinkr6r.r5r=s rrzHTMLDoc.docroutine"s?x ?G "" s:TA F # # _F|| T::(( +,t~~fc/J/JJ/$..$c3+3++(00 %f--  D!.:/$..32O2OODDW,,#dnnXs&C&CCD "    F  f % % *'*=  !3 3 3  7#7##=#H H HOOFC00E *!E)  ' / / *622 %NNN 8   >DffhhhOEE&r8R88FBBBK#%000(((<??8,,D#hh(E  V $ $ 0 !#-f55  * ! ! !  ! 0i..z))BTIE"10")!B$- G% G(<(<<AHyy?$FGGI  <+d2 2++vwIICGACGCC15sss; ;s$ D DDH33I I cg}|j}|r|d|z|t||j}|r|d|z|dd|S)z1Produce html documentation for a data descriptor.z!
%s
z&
%s
rrK)rrrQr}rX r:rAr#rrrrrr=s rrzHTMLDoc.docdata{s~  > D5< = = =kk&..$.99  B D:S@ A A A YwwwrcD|rd|zpd}|||zS)z-Produce HTML documentation for a data object.z%s = rKr)r:rAr#rrlhss rrzHTMLDoc.docothers.6/$6<"TYYv&&&&rcFg}|i}tj|gD]@\}}}td|Dr ||d|||vfd||<A||||j}||d|S)z2Generate an HTML index for a directory of modules.Nc3PK|]!}dt|cxkodkncV"dS)iiN)ordrchs r z HTMLDoc.index..sD@@RFc"gg////////@@@@@@rrKrTr)rranyrrrrrx)r:rrrrr#rris rrz HTMLDoc.indexs  X%,%93%%@%@   !HdE@@4@@@@@  NND"eTX-=> ? ? ?HTNN ##GT_==sGX666rrK)rorKNrlrrNNN)r)rrr@r:_repr_instancerrMrjrnrvrxr}rrrrrrrrrrrrr:rrr6rrrrrrereDs11XZZN  D  "F & & &&&&&3419UUUU**** <<< 5 5 5GFF***///&OOO 3 3 3888#'b"b' ' ' ' V****&ssssj%)d"b`>`>`>`>D222'+RdW<W<W<W.s*55"rDy2~555555r)rXrLs rboldz TextDoc.bolds#ww55555555r c|sdSfd|dD}|r|d|d<d|S)z6Indent text by prepending a given prefix to each line.rKcg|]}|zSrr)rrprefixs rrz"TextDoc.indent..s<<<4$<<.s-DDyG44DDDDDDrr)rrSrl)rCr^rXr) r:rr]rrorPrrrrs ` rrzTextDoc.formattrees 8 8EE{{d2hh&& 5&9Q+@+@@BUvi//DDDDeDDDG#ftyy/A/A&AAF$eR(($//7Av#8#88 rc  |j}tt|\}}|d||od|zz}t |dd}||} | ||d| dzz}|r||d|z}g} t j|t jD]G\} } |t j | p||ur(t| ||r| | | fHg} t j|t j D]Y\} } |*t j | st j | |ur(t| ||r| | | fZg}t j|tD]-\} } t| ||r| | | f.g}t}t!|drt#j|jD]K\}}}|||r| |d z6| |L|||d d |z}g}t j|t jD];\} } | j|d zr| |vr| | <|r@|||d d |z}| rd| D}|t j|d|g}| D]/\} } | || | |0||dd |z}| r`g}| D]/\} } | || | |0||dd |z}|rbg}|D]1\} } | || | |d2||dd |z}t!|dret;|j}|dddkr*|dddkr|dd}||d|z}t!|dr+||dt;|j z}t!|dr+||dt;|j!z}t!|dr+||d t;|j"z} t j#|}n#tH$rd!}YnwxYw||d"|z}|S)#z5Produce text documentation for a given module object.NAMErrNzMODULE REFERENCEa. The following documentation is automatically generated from the Python source files. It may be incomplete, incorrect or include features that are considered implementation detail and may vary between Python implementations. When in doubt, consult the module reference at the location listed above. DESCRIPTIONr (package)zPACKAGE CONTENTSrSr SUBMODULEScg|]\}}|Srrrs rrz%TextDoc.docmodule..+s999:3999rrTCLASSES FUNCTIONSF)rqDATArrrrrVERSIONrDATErAUTHORrCREDITSr"FILE)%r)rZrQrvrr4rr~r rrrrdr-rhsetrrrraddrrXrcrrrrrrDrrVrrrr.rG)r:rAr#rrsynopdescrPrr3rrrrrr modpkgs_namesrr]r submodulesrrirrs rrzTextDoc.docmodules\vf~~.. tfde.E &FGGfi..''  dll+=vI@F  @dll=$???F!,VW_EE 1 1JC%e,,66AAsC001NNC<000!,VW5FGG / /JC!%(( ,3,=e,D,D,N,NsC00/LL#u...!,VV<< * *JC3V,, * S%L))) 6: & & 8,3,@,Q,Q , ,('5!!'***,NN7\#9::::NN7++++ LLNNNdll"DIIg$6$6888F !,VW5EFF ' 'JC~((44 'M9Q9Q!!#&&&  5 OO   dlldii 33555F  K99999I$Y22D::;H% A A U eS$ ? ?@@@@dll9dii6I6IJJJF  MH# A A U eS$ ? ?@@@@dll; (8K8KLLLF  HH" L L U eS$r J JKKKKdll6499X3F3FGGGF 6= ) ) ?&,--Gss|111gbcclc6I6I!"R%...00dll9g>>>F 6: & & Idll63v3G3GHHHF 6< ( ( Mdll8S9J5K5KLLLF 6= ) ) Odll9c&:L6M6MNNNF %f--DD   DDD $,,vt444 s9W WWcbj}|p|}j}jfd}||krd|z}n|dz|z}|r+t ||} |dd| zz}g} | j tj} n#ttf$rd} YnwxYw| r(t| } | r| dkr|| zdzt} | r| dzttj}t|d kr2d |D]}d ||zd t!d t"Dtj}t|}d}|rXd|d|D]}d |z||kr!dt||z zdzd Gfdd}|fd}fd}fd}fdt)D}|r|r|n|dd t-|fd\}}t.jurt.jur|}\urd}ndt3jz}t5||d|z|d}|d|z|d }|d!|z|d"}|d#|z|d$}|d%|z|d&}|d'|z|d(}|gksJ|}|d| } | s|dzS|dz| d)zdzS)*z4Produce text documentation for a given class object.c"t||Srru)rrs rmakenamez"TextDoc.docclass..makenameVsQ?? "rclass z = class r)rNr*rSrUzMethod resolution order:rlrKc3K|]=}|jds!|jdk't|jV>dS)rr-N)r)rrrD)rr"s rr[z#TextDoc.docclass..{sa S S3L++C00 S58^z5Q5Q  5Q5Q5Q5Q S SrrrzBuilt-in subclasses:z ... and z other subclassesc eZdZdZfdZdS)(TextDoc.docclass..HorizontalRulecd|_dSrrrFs rrz1TextDoc.docclass..HorizontalRule.__init__rrc:|jr dd|_dS)NzF----------------------------------------------------------------------rTrrs rrz.TextDoc.docclass..HorizontalRule.mayberrNrrsrrrrrrc Jt||\}}|r ||D]j\}}}} t |} || |;#t$r# || YgwxYw|Srr) rrrrr#rrrrrrArr:s rrzTextDoc.docclass..spills#E955IB E S 24 E E.D$E ' 5 5 T]]5(,c67DDEEEE %===T\\%s;;<<<<<=LsA33*B B ct||\}}|rI ||D]'\}}}} || (|Srrrs rrz*TextDoc.docclass..spilldescriptorsrrc Lt||\}}|r  ||D]k\}}}}t|} t |} n#t$r|j|} YnwxYw | | d|dzl|S)Nr~rqr=rS)rrrQrr8__dict__r)rrrrr#rrrr=r9rrrArr:s rrz#TextDoc.docclass..spilldatas#E955IB  S 24.D$ --C5%fd33)555%.t45DsD#bcJJLsA  A:9A:cHg|]\}}}}t|||||fSrr r s rrz$TextDoc.docclass..r rrc|duSrrrs rrz"TextDoc.docclass..rrrrz Methods %s: c|ddkSrrrs rrz"TextDoc.docclass..rrzClass methods %s: c|ddkSrrrs rrz"TextDoc.docclass..rrzStatic methods %s: c|ddkSrrrs rrz"TextDoc.docclass..rrzReadonly properties %s: c|ddkSrrrs rrz"TextDoc.docclass..r rzData descriptors %s: c|ddkSr"rrs rrz"TextDoc.docclass..r#rzData and other attributes %s: c|ddkSr%rrs rrz"TextDoc.docclass..r&rz | )r)rrrkmaprXrrr.r/rGrDrQrr+rWsortedrC__subclasses__r1rr,rr-rAr^rrprO)r:rAr#rrr0rrrhrrir.r6r=r1r< subclassesno_of_subclassesMAX_SUBCLASSES_TO_DISPLAY subclassnamerrrrrr3r4rrrs`` ` @@@rrzTextDoc.docclassPs?x  + # # # # 8  tyy222EEIIdOOk1HB?c2d||zSr8rTrOs rr:zTextDoc.formatvaluesTYYv&&&&rcv|j}|p|}||}d}d}d} t|r^|j} | |urt|dd} nt j| rdt | |z}ndt | j|z}npt j|st j |rF |j } |dt | |z}n*| |urdt | |z}n#t$rYnwxYw|} t j | r?|=| j |j ks| j|jd z|zkrt| |} | rd | z}t j|st j|rd } nd} ||kr||}nN|1t j||g|urd }|drd}||d z|z}d}t j|ro t j|}n#t.t0f$rd}YnwxYw|r>t3|}|dkr)||dz}|js |dd}|sd}| |z|z|z}|r|dzSt7|pd}|dz|o)||dzzS)z;Produce text documentation for a function or method object.NrKFr&r<r=r>r?rr@rAT = rBz lambda rTrrCrS)r)r{r*rrr r^r+r1rDr3r8r,rrrarErFrkrGrrdr.r/rGrDrHrQrprO)r:rAr#rrrr0rIrJrKrLrMrNrOrhr6r.r5r=s rrzTextDoc.docroutinesd?x ?G F # # _F|| T::(( +,y/E/EE/)$c3+3++(00 %f--  ?!.:/)Hc2J2JJDDW,,#i#&>&>>D "    F  f % % *'*=  !3 3 3  7#7##=#H H Hvs++E *!E)  ' / / *622 %NNN 8  IIh''EE&r8R88FBB??8,,DIIdOOe+h6E  V $ $ 0 !#-f55  * ! ! !  ! 0i..z)) IIdOOj8E"10")!B$- G%/$6  L$; ..&BC$;#"J$++c*:*:*A*A*C*Cd*JK Ks$,C!! C.-C.4H HHc g}|j}|r)||||dt|pd}|r)||||dd|S)z1Produce text documentation for a data descriptor.rSrK)rrkrQrprXrRs rrzTextDoc.docdata=s~   D4 ! ! ! DJJJVnn"   DS!! " " " DJJJwwwrrcP||}|r1|r|dzpd|z} |t| z } | dkr |d| dz}|r||dzpd|z} |st|}|r+| d|t |zdzz } | S)z-Produce text documentation for a data object.rrKrNrorS)rrWrkrQrprD) r:rAr#rrrqr=rrrchops rrzTextDoc.docotherMsyy    4)TE\/R47DCII%DaxxUdU e 304506B$> !..C  8 D4;;s3xx00047 7D r)rl)NrKr)NNNNr^)r)rrr@rar_rrkrprvrrrr:rrr6rrrrrgrgs11XZZN  D666    AAA ccccJXLXLXLXLt'''MLMLMLML^     K $       rrgceZdZdZdZdS) _PlainTextDocz2Subclass of TextDoc which overrides string stylingc|SrrrLs rrkz_PlainTextDoc.bold^s rN)r)rrr@rkrrrrr\s)<<rrc@tat|dS)zCThe first time this is called, determine what kind of pager to use.N)getpagerpagerrws rrrcs JJE $KKKKKrchttjdstSttjdstStjrtjstStjdkrtStj dptj dr@tjdkrfdStj ddvrfd Sfd Stj ddvrtStjdkrd Sttd rtj d dkrdSddl }| \}}tj | ttd r2tj d|zdkrdtj|Sttj|S#tj|wxYw)z2Decide what method to use for paging through text.isatty emscriptenMANPAGERPAGERwin32c>tt|Sr tempfilepagerplainrj use_pagers rrzgetpager..vs eDkk9 E ErTERM)dumbemacsc>tt|Sr) pipepagerrrs rrzgetpager..xs %++y A Arc$t|Srrrs rrzgetpager..zs $ : :rc<tt|dS)Nzmore .~sM%++x@@rsystemz(less) 2>/dev/nullrc"t|dS)Nlessrrws rrzgetpager..sIdF33rNz more "%s"c"t|dS)Nmorerrws rrzgetpager..s $ 7 7r)rr stdin plainpagerstdoutrplatformr r/rrtempfilemkstempcloseunlinkttypager)rfdrrs @rrris 39h ' ' 3:x ( ( 9    SZ%6%6%8%8 ||## z**EbjnnW.E.EI; <7 " "EEEE E Z^^F # #'8 8 8AAAA A:::: : z~~f!222 |w@@@r84+?!@!@A!E!E333OOO%%''NRHRLLL 2x  RY{X/E%F%F!%K%K77 ( ( (s92HHH1c.tjdd|S)z%Remove boldface formatting from text.z.rK)rMrNrws rrrs 6%T " ""rcHddl}||d|jd} |j5} ||n#t $rYnwxYwdddn #1swxYwYn#t $rYnwxYw |dS#t $rYnwxYw()z3Page through text by feeding it to another program.rNTbackslashreplace)shellrerrors) subprocessPopenPIPErwriteKeyboardInterruptrwait)rjcmdrprocpipes rrrs4   Ct:?#5  7 7D  Z 4  4    $                           IIKKK E     D  siA+AAA A AAA A+A##A+&A#'A++ A87A8=B B B c ddl}|5}tj|d}t |ddt jdkrtjdnd5}| |dddn #1swxYwYtj |dz|zd zddddS#1swxYwYdS) z.s#)..++rc^tjddddS)NrrT)r rrrrrrzttypager..s&#),,..ss3BQB7rLINESrTz -- more --)qQz ) rS)bB)rrrttyr rfileno tcgetattr setcbreakr r8ioUnsupportedOperationrr r/rr/rrrXflush tcsetattr TCSAFLUSH) rjrYrroldgetcharhrYincrs rrrs .&& ' ' - -d 3 3E8 Y    mmB b++ )@ A8887782 BJNN7A..//AA   AAA  66Aa%C 5#;//$6777ABBi  J  \ * * * J      AJ   !1222l""   !1E!H!Simply print unformatted text. This is the ultimate fallback.N)r rrrrrws rrrs.JU>$//0011111rctj|rA|jtjvr d|jzSt |dr d|jzSd|jzStj|r d|jzStj|r$d|jj d|jjd|jStj |r$d|jj d|jjd|jStj |r d |jzStj |r d |jzStj |r d |jzSt|jS) z/Produce a short description of the given thing.zbuilt-in module rzpackage zmodule zbuilt-in function zgetset descriptor rzmember descriptor rz function zmethod )rrcr)r rrr-isgetsetdescriptorr3rr4r r,r(rC)things rdescriber s|. >S5 5 5%6 6 5* % % .. .u~- -5#en44!%((   ) ) )5+=+F+F+F NN !%((   ) ) )5+=+F+F+F NN u)%.((%  ,U^++*5>)) ;; rcd|dD}d\}}|t|krLtd|d|dz|}|r||dz}}nn|t|kL|r|}nt}||dD]%} t ||}#t $rYdSwxYw|S)z@Locate an object by name or dotted path, importing as necessary.cg|]}||Srr)rrs rrzlocate..s 6 6 6d 6T 6 6 6rrrNrT)rrWrrXr-rr8)r r rrn nextmodulerArs rlocaters 6 6djjoo 6 6 6EIFA c%jj..t!t 5 5yAA  :q1uqvv c%jj..abb  VT**FF   444  MsB.. B=<B=ct|tr(t||}|td|z||fSt |dd}|t|tr|ndfS)zDGiven an object or a path to an object, get the object and its name.Nz~No Python documentation found for %r. Use help() to get the interactive help utility. Use help(str) for help on the str class.r))r.rDrr r)r r rAr#s rresolvers% >y)) >,/4455 5u}uj$//js33=dd==r Python Library Documentation: %scN|t}t||\}}t|}tj|}|r(d|vr$|d|d|dzz }n|r||ur |d|jzz }tj|swtj|sctj |sOtj |s;t|s,t|dr|j }nt|}|dz }||zdz|||zS)zBRender text documentation, given an object or a path to an object.Nrz in z in module __origin__z objectrz)rjrr rrrfindr)rcr rdr2rIrrrCr)r rhr rendererrAr#rrs r render_docr,sL5),,LFD F  D  v & &F 0t  .tzz#./// 0F&(( //  V $ $ of%% '' &v.. foo  6< ( ( &FF&\\F I D 4<& 8#4#4VT#B#B BBrFcH|K tt|||dS#t$r}|rt|Yd}~dSd}~wwxYw t|||t}n&#t$r}t |}Yd}~nd}~wwxYw||dS)zCDisplay text documentation, given an object or a path to an object.N)rrr print plaintextrDr)r rhr outputis_clirrs rr=r=Gs~  *UE955 6 6 6 6 6     #JJJJJJJJJ   5%I>>AA   CAAAAAA  Qs,$ A AA A'' B 1BB cXt||\}}tt|t||}t |dzdd5}||dddn #1swxYwYtd|dzdS)z"""""s*B  BBrKcf|i}tj|g|D]\}}}t|dS)zAWrite out HTML documentation for all modules in a directory tree.N)r walk_packagesr")rpkgpathdonerr]rs r writedocsr'`sF |BT$+$93%$I$I '5 Frc>eZdZiddddddddddd d d d d dddddddddddddddddddid d!d"d#d$d%dd&d#d'd(d)d*d+d,d-d.d/d0dd1dd2d3d4d5d6d7dd8d9d:dd;dd?DZd@dAdBdCgeRdDdEdFdGdHdIdJZdKdLdMdNdOdPdQdRdSdTdUdVdVdWdWdXZeD]1\ZZ e D])Z e e eZ ee vre dYzezZ e ee <*2[[ [ [ idZd[dRd\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdZdxdZidydzdOd{d|d}d~ddddd#ddddddddddddddddddddddidddddddddddddddddddSdddddkdddddddndddidddddddddLddddddd“ddēd+dœddƓdd ddɓdd˓dddd6dd#ddddddӜZ ddՄZ edքZedׄZd؄ZeZefdلZdڄZdۄZdd݄ZdބZddZdZdZdZddZddZdZddZ dS)HelperFalserKNoneTrueandBOOLEANaswithassert)r1rKasync)r2rKawait)r3rKbreak)r4 while forclass)r6zCLASSES SPECIALMETHODScontinue)r7r5def)functionrKdel)r: BASICMETHODSelififelse)r>r5excepttryfinallyfor)rBzbreak continue whilefromimportglobal)rEznonlocal NAMESPACES)r= TRUTHVALUE)rDMODULESin)rHSEQUENCEMETHODSis COMPARISONlambda)rLr}nonlocal)rMzglobal NAMESPACESnotorpass)rPrKraise)rQ EXCEPTIONSreturn)rSr})r@rRwhile)rTzbreak continue if TRUTHVALUE)r0z CONTEXTMANAGERS EXCEPTIONS yieldyield)rUrKc"g|] }dD]}||z S)'rr)rprs rrzHelper.s)LLLaLLAAELLLLr)rfrYurXz'''rr)+r ***r,z//%<<>>rI|^~rJrK<=>===!=<>)rJrKrerfrgrhri)r rd) z+=z-=z*=z/=z%=z&=z|=z^=z<<=z>>=z**=z//=)r`rarIrbrcrd)jJ)STRINGS OPERATORSrKUNARYAUGMENTEDASSIGNMENTBITWISECOMPLEXzOPERATORS FORMATTINGPOWERzTUPLES LISTS FUNCTIONSz ATTRIBUTES FLOAT MODULES OBJECTSELLIPSISzSLICINGS DICTIONARYLITERALSz def classrl PRIVATENAMESzPRIVATENAMES SPECIALMETHODS BACKQUOTESzTUPLES FUNCTIONS CALLSzLISTS SUBSCRIPTS SLICINGS)r_r^,rro:@rrr`rr[]rTYPES)typeszRSTRINGS UNICODE NUMBERS SEQUENCES MAPPINGS FUNCTIONS CLASSES MODULES FILES inspect)stringsz4str UNICODE SEQUENCES STRINGMETHODS FORMATTING TYPES STRINGMETHODS)zstring-methodszSTRINGS FORMATTING FORMATTING) formatstringsrmUNICODE)r~z:encodings unicode SEQUENCES STRINGMETHODS FORMATTING TYPESNUMBERS)numberszINTEGER FLOAT COMPLEX TYPESINTEGER)integersz int rangeFLOAT)floatingz float mathrq) imaginaryz complex cmath SEQUENCES)typesseqz$STRINGMETHODS FORMATTING range LISTSMAPPINGS DICTIONARIESr})typesfunctionsz def TYPESMETHODS) typesmethodszclass def CLASSES TYPES CODEOBJECTS)zbltin-code-objectszcompile FUNCTIONS TYPES TYPEOBJECTS)zbltin-type-objectsz types TYPES FRAMEOBJECTS TRACEBACKSNONE)zbltin-null-objectrK)zbltin-ellipsis-objectSLICINGSSPECIALATTRIBUTES) specialattrsrKr|)r}z!class SPECIALMETHODS PRIVATENAMESrG) typesmodulesrDPACKAGES EXPRESSIONS)zoperator-summaryzlambda or and not in is BOOLEAN COMPARISON BITWISE SHIFTING BINARY FORMATTING POWER UNARY ATTRIBUTES SUBSCRIPTS SLICINGS CALLS TUPLES LISTS DICTIONARIESrm PRECEDENCEOBJECTS)objectsr|SPECIALMETHODS) specialnameszbBASICMETHODS ATTRIBUTEMETHODS CALLABLEMETHODS SEQUENCEMETHODS MAPPINGMETHODS NUMBERMETHODS CLASSESr;) customizationzhash repr str SPECIALMETHODSATTRIBUTEMETHODS)zattribute-accesszATTRIBUTES SPECIALMETHODSCALLABLEMETHODS)zcallable-typeszCALLS SPECIALMETHODSrI)sequence-typesz(SEQUENCES SEQUENCEMETHODS SPECIALMETHODSMAPPINGMETHODS)rzMAPPINGS SPECIALMETHODS NUMBERMETHODS)z numeric-typesz*NUMBERS AUGMENTEDASSIGNMENT SPECIALMETHODS EXECUTION) execmodelz%NAMESPACES DYNAMICFEATURES EXCEPTIONS NAMESPACES)namingz3global nonlocal ASSIGNMENT DELETION DYNAMICFEATURESDYNAMICFEATURES)zdynamic-featuresrKSCOPINGFRAMESrR)r$ztry except finally raise CONVERSIONS) conversionsrK IDENTIFIERS) identifierszkeywords SPECIALIDENTIFIERSSPECIALIDENTIFIERS)z id-classesrK)zatom-identifiersrKLITERALS)z atom-literalsz=STRINGS NUMBERS TUPLELITERALS LISTLITERALS DICTIONARYLITERALSTUPLES TUPLELITERALS) exprlistszTUPLES LITERALSLISTS)ztypesseq-mutable LISTLITERALSr)listszLISTS LITERALS) typesmappingDICTIONARYLITERALSr)r5zDICTIONARIES LITERALS ATTRIBUTES)zattribute-referencesz(getattr hasattr setattr ATTRIBUTEMETHODS SUBSCRIPTS) subscriptionsrIr)slicingsrICALLS)callsr)powerrrn)unaryrBINARY)binaryrSHIFTING)shiftingrrp)bitwiser) comparisonszEXPRESSIONS BASICMETHODS)booleanszEXPRESSIONS TRUTHVALUE ASSERTION ASSIGNMENT) assignmentroro) augassignrDELETION RETURNING IMPORTING)compoundzfor while break continue)truthz if while and or not BASICMETHODS)debuggerpdb)zcontext-managersr0) CONDITIONALLOOPINGrF DEBUGGINGCONTEXTMANAGERSNc"||_||_dSr)_input_output)r:inputrs rrzHelper.__init__s  rc(|jp tjSr)rr rrFs rrz Helper.inputs{'ci'rc(|jp tjSr)rr rrFs rrz Helper.outputs|)sz)rctjdddkr |dSd|jjd|jjdS)NrTrn?rKrJrz instance>)rstackr+rrrFs r__repr__zHelper.__repr__#s\ =??1 a C ' ' DFFF2 (&*^%>%>%>%)^%@%@%@B Brc6||jurM ||dS#t$r(}|j|dYd}~dSd}~wwxYw|||jddS)NrSa 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. )_GoInteractiverr rrintrointeract)r:requestes r__call__zHelper.__call__+s $- - - , '""""" , , , !!Q(((+++++++++ , JJLLL MMOOO K       s" AAAc|jd |d}|sdSn#ttf$rYdSwxYw|}t |dkr6|d|dcxkrdvrnn|d|ddvr |dd}|d vrdS|d kr|n| |) NrSTzhelp> rUrrrWrT)rquitr) rrgetlinerEOFErrorrVrWr1rr)r:rs rrzHelper.interact;s $ # ,,x00%%%x0    mmooGG q  WQZ72;%L%L%L%L*%L%L%L%L%L '!B$-77!!B$-}}-//&    '"""# #s7A  A c|jtjurt|S|j||j|jS)z.Read one line, using input() when appropriate.)rr rrrrr)r:prompts rrzHelper.getlinePs[ : " "== K  f % % % K     :&&(( (rFct|trz|}|dkr|n|dkr|nf|dkr|nJ|dkr|n.|dddkr.||dn||jvr| |n|dvr tt|d | n||j vr| |n||jvr| |nq|rt|d |j| nVttd |j| n8t|t r |nt|d |j| |jd dS) Nkeywordssymbolstopicsrzmodules rT)r,r*r+z Help on %s:r)rrrS)r.rDrV listkeywords listsymbols listtopics listmodulesrr showsymbolr=evalr showtopicrrr)rr)r:rrs rrz Helper.helpYs gs # # NmmooG*$$d&7&7&9&9&9&9I%%t'7'7'9'9'9'9H$$doo&7&7&7&7I%%t'7'7'9'9'9'9! **  !34444DL(($//'*B*B*B*B555DMM=@@@@@DM))4>>'+B+B+B+BDK'')@)@)@)@ N#g}T\RXYYYYYc=fMMMMM  ( ( N$$&&&&'=fMMMM $rc|jddtjddzdS)NaWelcome to Python {0}'s help utility! If this is your first time using Python, you should definitely check out the tutorial at https://docs.python.org/{0}/tutorial/. Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To get a list of available modules, keywords, symbols, or topics, enter "modules", "keywords", "symbols", or "topics". Each module also comes with a one-line summary of what it does; to list the modules whose name or summary contain a given string such as "spam", enter "modules spam". To quit this help utility and return to the interpreter, enter "q" or "quit". z%d.%drU)rrr0r r5rFs rrz Helper.intronsK   F7S%bqb) )**! , , , , ,rrPc tt|}||z}t||zdz |z}t|D]}t|D]}||z|z}|t|krb|j||||dz kr9|jdd|dz t||z zz|jddS)NrTrrS)rrrWrrr) r:itemscolumnsrrcolwrrowrrs rrz Helper.listsVE]]##E W$q(W4;; $ $CW~~ R R$J$s5zz>>K%%eAh///Wq[(( ))#tax#eAh--7O0P*PQQQ K  d # # # # $ $rc|jd||jdS)NzN Here is a list of the Python keywords. Enter any keyword to get more help. )rrrrrrFs rrzHelper.listkeywordssI     $-$$&&'''''rc|jd||jdS)Nzx Here is a list of the punctuation symbols which Python assigns special meaning to. Enter any symbol to get more help. )rrrrrrFs rrzHelper.listsymbolssI     $,##%%&&&&&rc|jd||jdS)NzN Here is a list of available topics. Enter any topic name to get more help. )rrrrrrFs rrzHelper.listtopicssI     $+""$$%%%%%rcf ddl}n+#t$r|jdYdSwxYw|j||j|}|s,|jdt|zdSt|tdur| ||S|\}} |jj|}n;#t$r.|jdt|zYdSwxYw| dz}|r |pddz|z}|rbddl }dd |zdz} || d } |d d | zz }t!|dS) Nrt Sorry, topic and keyword documentation is not available because the module "pydoc_data.topics" could not be found. zno documentation found for %s rKrSrRelated help topics: rHz %s )pydoc_data.topicsr rrrrrrrCrKeyErrorrVtextwraprXrwrapr) r:topic more_xrefs pydoc_datatargetlabelxrefsr=rrj wrapped_texts rrzHelper.showtopics  $ $ $ $ $    K      FF    (9(9%(@(@AA  K  ?$u++M N N N F <<488 # #>>&*55 5 u #*51CC    K  ?$u++M N N N FF iikkD   5[bC'*4E  6 OOO*TYYu{{}}-E-EELD#==r22L 8dii 555 5C c s$// C 4DDc\ ddl}n#t$rYdSwxYw|j||j|}|st dt |tr|||S|\}}|jj|}|r |pddz|z}||fS)a*Return unbuffered tuple of (topic, xrefs). If an error occurs here, the exception is caught and displayed by the url handler. This function duplicates the showtopic method but returns its result directly so it can be formatted for display in an html page. rN)r rKzcould not find topicrKr) r r rrrr/r.rD _gettopic)r:rrrrrrr=s rrzHelper._gettopics $ $ $ $ $        (9(9%(@(@AA 5344 4 fc " " 6>>&*55 5 u&u-  5[bC'*4EEzs  c~|j|}|d\}}}|||dS)Nr)r partitionr)r:symbolrrrrs rrzHelper.showsymbolsAf% **3//q% ue$$$$$rc|r>|jd|t|dS|jdi}|fdfd}t ||||jddS)Nzy Here is a list of modules whose name or summary contains '{}'. If there are any, enter a module name to get more help. zI Please wait a moment while I gather a list of all available modules... c|r|dddkr |dddz}|ddkrd||<dSdS)N .__init__ryrrrT)find)r r]rrs rcallbackz$Helper.listmodules..callbacks]:wrss|{::%crcl\9G<<$$q(('(GG$$$)(rc"d|ddSrr)r]r!s ronerrorz#Helper.listmodules..onerrorsw-----rr#z Enter any module name to get more help. Or, type "modules spam" to search for modules whose name or summary contain the string "spam". )rrr0apropos ModuleScannerrunrr)r:rrr#r!s @rrzHelper.listmoduless   K   F3KK     CLLLLL K     G6= ) ) ) )  . . . . . OO  '  : : : IIgllnn % % % K       rr)F)rrr])!r)rrr _strprefixes_symbols_inverserrrsymbols_rrrrr/rrrrArrrrrrrrrrrrrrrrrr)r)gs$$$ $ y $ f $ . $ $ $ '$ 4$ -$ $ &$ $ %$ %!$" 5#$$$ .%$& '$( 3)$* "+$, '-$. '/$0 l1$2 )3$4 55$6 y7$8 i9$:  ;$< (=$> )?$@ $A$B :C$D !U" H#U$ <%U& 'U( g)UU* )+U, 9-U. 1/U0 A1U2 -3U4 H5U6 .7U> ]?U@ mAUB 'CUD 4EUJ IKUL MMUN EOUP /QUT GUUV ,WUUUZ K[U\ W]U^ 3_U` {U| ?}UUU~ ZU@ :AUB 3CUD )EUF )GUH )IUJ +KUL /MUN -OUP AQUR 9SUT XUUV ;WUX =YUZ E[U\ X]U^ X_UU`;C(7iUUUFn((X(**X*BBBVXXN- ###*)))    *,,,& $ $ $ $((('''&&&@6%%% rr)ceZdZdZddZdS)r&z7An interruptible scanner that searches module synopses.Nc|r|}d|_i}tjD]}|dkrd||<||d|dt |jpd}|dd}|dz|z}||dkr |d||tj |D]\} }} |jrn||d|d! tj | |} n#t$rYDwxYw| j } t| d r | |} n#t$r|r ||YwxYwt!t#j| pd}t| d r| |}n{d}nx t(j| }n#t.$r|r ||YwxYw|jr|jdnd}t3|d d}|dz|z}||dkr |||||r |dSdS) NF__main__rTrKrSrrr$ get_source get_filenamer)r1rr rrr@rr rr$ _get_specrrrr.rrrStringIOr/rrrr rr)r:r!r completerr#seenr]r#rrrrrsourcer rs rr'zModuleScanner.run s !ciikk / 6 6G*$$ !W ;HT7B////%g..6<"D::d++A.D"U?T1Dzz||((--22 w555(/(=g(N(N(N$ 2$ 2 $Hguy {w++++",Xw??DD"H6<00;!!'!2!27!;!;$!!!"-#GG,,, !+2;v+>+>??E2Dv~66$%227;;#!!*!5!;!;D!A!A&!!!"-#GG,,, !>D^S6>4466q99QSD"6*T::D-::<<$$S))Q..HT7D111   IKKKKK  s62D DD0EE E 0GG+*G+r^)r)rrr@r'rrrr&r& s.AA888888rr&cd}d}tj5tjdt|||ddddS#1swxYwYdS)zAPrint all the one-line module summaries that contain a substring.cf|dddkr |dddz}t||od|zdSNrrryz- )r)r r]rs rr!zapropos..callbackA sF 233<; & &crcl\1G gt+t ,,,,,rcdSrrr]s rr#zapropos..onerrorE s rignorer$N)warningscatch_warningsfilterwarningsr&r')rr!r#s rr%r%? s---    " "<<)))Hc7;;;<<<<<<<<<<<<<<<<<>> import time >>> import pydoc Define a URL handler. To determine what the client is asking for, check the URL and content_type. Then get or generate some text or HTML code and return it. >>> def my_url_handler(url, content_type): ... text = 'the URL sent was: (%s, %s)' % (url, content_type) ... return text Start server thread on port 0. If you use port 0, the server will pick a random port number. You can then use serverthread.port to get the port number. >>> port = 0 >>> serverthread = pydoc._start_server(my_url_handler, port) Check that the server is really started. If it is, open browser and get first page. Use serverthread.url as the starting page. >>> if serverthread.serving: ... import webbrowser The next two lines are commented out so a browser doesn't open if doctest is run on this module. #... webbrowser.open(serverthread.url) #True Let the server do its thing. We just need to monitor its status. Use time.sleep so the loop doesn't hog the CPU. >>> starttime = time.monotonic() >>> timeout = 1 #seconds This is a short timeout for testing purposes. >>> while serverthread.serving: ... time.sleep(.01) ... if serverthread.serving and time.monotonic() - starttime > timeout: ... serverthread.stop() ... break Print any errors that may have occurred. >>> print(serverthread.error) None rNceZdZdZdZdS)!_start_server..DocHandlercT|jdrd}nd}|d|dd|z||j||j|ddS) zProcess a request from an HTML browser. The URL received is in self.path. Get an HTML page from self.urlhandler and send it. z.csstext/css text/htmlz Content-Typez%s; charset=UTF-8rN) r r send_response send_header end_headerswfiler urlhandlerr)r: content_types rdo_GETz(_start_server..DocHandler.do_GET s y!!&)) +) *   s # # #   ^-@<-O P P P       J  T__ <)))/ : : : : :rcdSrr)r:rs r log_messagez-_start_server..DocHandler.log_message s DrN)r)rrrKrMrrr DocHandlerr@ s2 : : :      rrNc&eZdZdZfdZdZdS) _start_server..DocServerc||_|j|f|_||_|j||j|jd|_dSNF)hostaddressr!r<rhandlerr)r:rSportr!s rrz)_start_server..DocServer.__init__ sGDI It,DL$DM I  tT\4< @ @ @DIIIrc|jsQ|jgggd\}}}|r||jQ|dSr})rselectsocketrhandle_request server_close)r:rdwrexrXs rserve_until_quitz1_start_server..DocServer.serve_until_quit s{i *#]]DK,>,>,@,@+A2r1MM B*'')))i *        rcv|j||jr||dSdSr)r<server_activater!rFs rraz0_start_server..DocServer.server_activate sD I % %d + + +} $ d##### $ $rN)r)rrrr_ra)rXsr DocServerrP sL         $ $ $ $ $rrbc6eZdZfdZfdZdZdZdS)#_start_server..ServerThreadc||_||_t||_j|d|_d|_d|_dSrR) rIrSrrVThreadrservingerror docserver)r:rIrSrV threadings rrz,_start_server..ServerThread.__init__ sN(DODID DI   % %d + + + DLDJ!DNNNrc: jj__jj_t|j_|j |j |j }||_ | dS#t$r}||_Yd}~dSd}~wwxYw)zStart the server.N)server HTTPServerr<rUrMessage MessageClass staticmethodrIrSrVreadyrir_rrh)r:docsvrrrNrbemailhttps rr'z'_start_server..ServerThread.run s !%!7 $. !*/-*? '(4T_(E(E %"49diDD!''')))))     sA9A>> BBBcpd|_|j|_|j|_d|j|jfz|_dS)NTz http://%s:%d/)rgrS server_portrVr)r:rls rrqz)_start_server..ServerThread.ready s5DL DI*DI&$)TY)??DHHHrcpd|j_|d|_d|_d|_dS)z&Stop the server and this thread nicelyTNF)rirrXrgrrFs rstopz(_start_server..ServerThread.stop s4"&DN  IIKKK"DN DLDHHHrN)r)rrrr'rqrx)rNrbrsrtrjsr ServerThreadrd sw " " " " "         @ @ @      rryg{Gz?) http.server email.messagerXrjrlBaseHTTPRequestHandlerrmrfrrhrgritimesleep) rIhostnamerVrythreadrNrbrsrtrXrjs @@@@@@r _start_serverrM s^pMMMT[7,$$$$$$$DK*$$$*&&&&&&&&&&&y'&&&P\*h 5 5F LLNNNlFNv7G 3lFNv7G MrrCc G fddt}|fd fd fd fdfd fdfd  fd  fd }|d r |d d}|dkrtjtjt }tj||}t|5}d| cdddS#1swxYwYn|dkr ||Std|d|)aThe pydoc url handler for use with the pydoc server. If the content_type is 'text/css', the _pydoc.css style sheet is read and returned if it exits. If the content_type is 'text/html', then the result of get_html_page(url) is returned. ceZdZfdZdS)_url_handler.._HTMLDocc @d}d|z}d|d|dd|d S)rgzpydoc_data/_pydoc.cssz1zH Pydoc: z z z*
z
r)r:rhricss_pathcss_link html_navbars rrjz#_url_handler.._HTMLDoc.page sE.HC HUUHHHkkmmmmXXX? ?rN)r)rrrj)rsr_HTMLDocr s. ? ? ? ? ? ? ?rrctjdtjddtjd}d|dtjdd S) Nz [rrr{z=
Python 
T)tersea
)rMrpython_version python_buildpython_compiler)rr!s rrz!_url_handler..html_navbar s++x/F/H/H/H/H/7/D/F/Fq/I/I/I/7/G/I/I/I/IKLL077DKK(9(E(E(EFFFF+H Hrcd}d}dtjD}||}|ddd|zg}i}tjD]+}|||,|ddd |fS) zModule Index page.cd|d|dSNrrrrr#s r bltinlinkz3_url_handler..html_index..bltinlink! 15ttt< Index of Modules
cg|] }|dk| S)r-r)rr#s rrz4_url_handler..html_index..' s,((($J&&&&&rz

zBuilt-in Modulesrzf

pydoc by Ka-Ping Yee<ping@lfw.org>

zIndex of ModulesrK) rnr rrrxr rrrX)rrnnamesrir3rr!s r html_indexz _url_handler..html_index s = = =,, =  ((#":(((##E955UT__ &3&3348 3 3C OODJJsD11 2 2 2 2 ' ( ( ("2778#4#444rc g fd}tj5tjdd}t|||dddn #1swxYwYd}g} d} D]&\}}||||z'| d|zd d |z}d |fS) zSearch results page.cv|dddkr |dddz}||od|zfdSr7r)r r]r search_results rr!z3_url_handler..html_search..callback; sPrss|{**!#2#,5  '4+?D4K!@ A A A A Arr:cdSrrr9s rr#z2_url_handler..html_search..onerrorB srr$Ncd|d|dSrrrs rrz4_url_handler..html_search..bltinlinkG rrz-Search Resultszkey = %srrzSearch Results) r;r<r=r&r'rnrrxrX) rr!r#rrrnr#rrirr!s @r html_searchz!_url_handler..html_search6 s  B B B B B  $ & & @ @  #H - - -    OO  #w  ? ? ?  @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ = = =,, ;  ( 3 3JD$ NN99T??T1 2 2 2 2T__  gv{{7';';===))sINDEXTopicsr)rnrr)rrrrx)rrnrrir!s r html_topicsz!_url_handler..html_topicsT s B B B,, 2  v}))++,,##E955T__ gx)))!!rcd}ttj}d}||}|dd|z}d|fS)zIndex of keywords.rcd|d|dSrrrs rrz6_url_handler..html_keywords..bltinlinkk rrKeywordsr)rnrr)rrrrx)rnrrrir!s r html_keywordsz#_url_handler..html_keywordsd s,, 2  v++--.. B B B##E955T__ +++8##rctj}t||}||\}}||jvrd}nd}d|z}d|z}|d|}|rQt| }d} ||} dd|}|d|d |||ffS) zTopic or keyword help page.KEYWORDTOPICrz
%s
rcd|d|dSrrrs rrz7_url_handler..html_topicpage..bltinlink s:>$$EErr rrK) rr1r)rrrnrrxrrrrvrX) rbufhtmlhelprirrhrnrr!s rhtml_topicpagez$_url_handler..html_topicpages s!kmm#s##",,U33% H% % %EEE,, /% 7  #T[[%:%::??57H==  J5;;==))E F F F$$UI66ELL!8'5IIE 55%%((E2335 5rct|d}||dkrtdt|}||}||fS)NrT)r r+zcould not find object)rr/r r)rr9rhcontentr!s r html_getobjz!_url_handler..html_getobj sYSA&&& ;3&==455 5 --S))g~rcd}dfdtt||D}||d|z}d|z|fS)Nz$Errorrc3BK|]}|VdSr)rM)rrr!s rr[z3_url_handler..html_error.. sGFFTt{{400FFFFFFrrhz Error - %s)rnrXrrCrx)rrrnrir!s r html_errorz _url_handler..html_error s,, 2  ;;FFFF4T#YYDDFFFFFT__S'8DDDc!8++rc|}|dr |dd} |dvr \}}n|dkr\}}n|dkr \}}nd|vr|d\}}}|dkr |\}}n|d kr.  |\}}n#t$r |\}}YngwxYw|d kr@|dvr \}}nK  |\}}n;#t$r |\}}Yn!wxYwtd  |\}}n&#t$r}||\}}Yd}~nd}~wwxYw||S) zGenerate an HTML page for url.r-N)rKrrrr9z search?keyz topic?keyzget?keyz bad pydoc url)rrr/rrj)r complete_urlrhroprrr!rrrrrrrs r get_html_pagez#_url_handler..get_html_page s <<  crc(C ;m##!+ww!,ww ""!.ww ]]3// As%%%0[%5%5NE77;&&:)7)<)<ww%:::)4S)9)9www:9__m++)3wwA-8[-=-=NE77)AAA-;^C-@-@NE777A%_555!,S!1!1w ; ; ;'Z c::NE777777 ;yy(((s`A2D(B&%D(&C>D(CD(C,+D(,DD(D D(( E 2EE r,rTNrBrKrCzunknown content type z for url ) rerr r dirnamerealpathrrXr readlinesrG)rrJrr path_hererfpr!rrrrrrrrs @@@@@@@@@r _url_handlerr sq???????7???$ 8::DHHHHH6555550*****<""""" $ $ $ $ $555552,,,,,&)&)&)&)&)&)&)&)&)&)&)&)P ~~c!""gz!!GOOBG$4$4X$>$>?? 7<< 3// (^^ +r772<<>>** + + + + + + + + + + + + + + + + +  $ $}S!!! )LLL##N O OOs2'D&&D*-D*T localhost) open_browserrcddl}tt||}|jrt |jdS|jr/d}|r||j t d|jt ||jratd}| }|dkrn7|dkr||jnt ||jan%#ttf$rt YnwxYw|jr%| t ddSdS#|jr$| t dwwxYwdS) zStart the enhanced pydoc web server and open a web browser. Use port '0' to start the server on an arbitrary port. Set open_browser to False to suppress opening a browser. rNz"Server commands: [b]rowser, [q]uitzServer ready atzserver> rrzServer stopped) webbrowserrrrhrrgrrrr1rrrx)rVrrr serverthreadserver_help_msgrs rbrowser s  x>>L l !!!(>  . OOL, - - - ( #\%5 6 6 6 / " " "& +J''iikk#::CZZOOL$45555/***& +"8,    GGGGG # (!!###&''''' ( (|# (!!###&'''' ('((s+B C,+D?,D D? DD??-E,crt|to"|tjdkSr)r.rDr r sep)rs rispathr s( a   5!&&..A"55rcd|vs#tj|vstj|vrdStjt }tj|}|}||vr5tj||s||| dtj|S)zEnsures current directory is on returned path, and argv0 directory is not Exception: argv0 dir is left alone if it's also pydoc's directory. Returns a new path entry list, or None if no adjustment is needed. rKNr) r curdirgetcwdr rrcopysamefileremoveinsert) given_pathargv0 stdlib_dir script_dir revised_paths r_get_revised_pathr s Z29 22bikkZ6O6Ot**J''J??$$LZ(8(8Z(P(PJ'''29;;''' rcttjtjd}||tjdd<dSdS)zEnsures current directory is on sys.path, and __main__ directory is not. Exception: __main__ dir is left alone if it's also pydoc's directory. rN)rr r argv)rs r_adjust_cli_sys_pathr s< %SXsx{;;L"  rc0ddl}Gddt}t |tjddd\}}d}d}d}d}d}|D]C\} } | d krd }d }| d krt | dS| d krd }| }| d krd }| dkrd }| }D|rt |||dS|s||D]C} t| rEtj | s&td| ztj d t| r.tj | rt| } |rNt| r/tj | rt!| n,t#| nt$| d #t&t(f$r.} t| tj dYd} ~ =d} ~ wwxYwdS#|j|f$rtj tj tjdd} td| tjYdSwxYw)z@Command-line interface (looks at sys.argv to decide what to do).rNceZdZdS)cli..BadUsageN)r)rrrrrBadUsager# srrrTzbk:n:p:wFrz-bTz-kz-pz-wz-n)rrzfile %r does not existrapydoc - the Python documentation tool {cmd} ... 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 '{sep}', 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. {cmd} -k Search for a keyword in the synopsis lines of all available modules. {cmd} -n Start an HTTP server with the given hostname (default: localhost). {cmd} -p Start an HTTP server on the given port on the local machine. Port number 0 can be used to get an arbitrary unused port. {cmd} -b Start an HTTP server on an arbitrary unused port and open a web browser to interactively browse documentation. This option can be used in combination with -n and/or -p. {cmd} -w ... Write out the HTML documentation for a module to a file in the current directory. If contains a '{sep}', it is treated as a filename; if it names a directory, documentation is written for all the contents. )rr)getoptrrr rr%rrr r existsrexitrrrr'r"rr rrhrrr0r)rroptsrwriting start_serverrrVroptvalargrrs rclir sMMM#####9###M!]]38ABB<<< d    HCd{{# # d{{ d{{# d{{d{{#    4( F F F F F#8^  Cc{{ 27>>##6#6 .4555  #;;*27>>##6#6*$S//C0c{{&rw}}S'9'9&!#  IIc$I///!23   e     $ L( #!!!grw// <<==a@ : FsF; ! ! ! ! ! !!sKAH1H8AHB)G?HH#G;5H;HHB JJr-r)r)rrN)rrNF)rKN)rC)cr@rrrrrr-importlib._bootstraprimportlib._bootstrap_externalimportlib.machineryimportlib.utilrrr rrrMr r7r}r urllib.parserr; collectionsrreprlibr tracebackrrr$r>r7rIrQrZr^rarhrlrtr IGNORECASErvrxr{rrrall_feature_namesrrrrrrrrrrrrr:rerargrrrrrrrrrr rrjrr!rrr=r"r'r)rr&r%rrrrrrrr)rrrrs%%L ( )  $$$$   ++++++   111f   !!! AAA     % % %GGG bj5r}EE (((   "J899((((0      " %%%%NKKKKK KKK666$ !,,,,`66666666t(((((t(((TY 7Y 7Y 7Y 7Y 7cY 7Y 7Y 7z:::::t:::@YYYYYcYYYv G """H###0 / / /FFF *2*2*2X222   6*wyy MOO wyy > > > >KLCCCC6DE!"####    WWWWWWWWr vxx;;;;;;;;z < < <VVVriPiPiPiPX (4+ ( ( ( ( (J6668###T!T!T!l zCEEEEEr