QfdZdgZdZdZdZddlZddlZddlZddl Zddl Zddl Zddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlmZddlmZdd lmZd Zd Z d Z!d Z"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*ejVdejXZ-dZ.dZ/dZ0dZ1e2ejfZ4dPdZ5dZ6dZ7dZ8dZ9ifd Z:Gd!d"e;ZGd%d&Z?Gd'd(eZ@Gd)d*e?ZAGd+d,eZBGd-d.e?ZCGd/d0eCZDd1aEd2ZFd3ZGd4ZHd5ZId6ZJd7ZKd8ZLd9ZMdQd:ZNeCZOeDZPeAZQdQd;ZR dRd<ZS dSd=ZTdQd>ZUdTd?ZVGd@dAZWeWZXGdBdCZYdDZZdEZ[dUdFZ\dQdGdHdIdJZ]dKZ^dLZ_dMZ`dNZaebdOk(reayy)VaGenerate 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_onlycJg}g}tjD]}tjj|xsd}tjj |}||vsJtjj |sj|j ||j ||S)zAConvert sys.path into a list of absolute, existing, unique paths..)syspathosabspathnormcaseisdirappend)dirsnormdirsdirnormdirs ,/opt/alt/python312/lib64/python3.12/pydoc.pypathdirsrRsz DHxxggoocjS)''""3' ( "rww}}S'9 KK  OOG $  Kctjj|j}|y|jj dddD]}t ||}tj|sy|S)Nr) r modulesget __module__ __qualname__splitgetattrinspectisclass)funcclsnames r _findclassr$^sb ++//$// *C {!!'',Sb1c4 2 ??3  Jrc~tj|rl|jj}|j}tj |r't t ||dd|jur|}n|j}ntj|r)|j}t|}|t |||urCytj|r\|j}|j}tj |r"|jdz|z|jk(r|}n|j}nt|tr4|j}|j}t|}|t |||urytj|stj |rb|j}|j"}t |||urytj$|r't |dd}t|t&r ||vr||Sy|j(D]} t+t ||}||cSy#t,$rY-wxYw)N__func__r __slots__)rismethodr&__name____self__r r __class__ isfunctionr$ isbuiltinr isinstancepropertyfgetismethoddescriptorisdatadescriptor __objclass__ismemberdescriptordict__mro__ _getowndocAttributeError)objr#selfr"r!slotsbasedocs r_finddocr>hs||$$|| OOD ! GD$-z :cll JC..C   C ||o ;'#t,C7   3 |||| OOD !    #d *c.>.> >C..C C "xx}} ;'#t,C7  # #C (G,D,DS,I|| 3 S (  % %c *Cd3E%&45=T{"  WT401C ?J      sH00 H<;H<c tj|d}|y|tur+t|j}t |t r||k(ry|S#t $rYywxYw)zUGet the documentation string for an object if it is not inherited from its class.__doc__N)object__getattribute__typer@r.strr8)r9r=typedocs rr7r7sa %%c95 ; d?3i''G'3'GsN sA2AA AAct|}| t|}t |t syt j|S#ttf$rYywxYw)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_getdocrIs[ V C { 6"C c3    C   *  s AAAct|xstj|}|xr%tjdd|j xsdS)z-Get the doc string or comments for an object.z^ * )rIr getcommentsresubrstrip)rAresults rgetdocrQs> V_ ; 3 3F ;F  :bffWb&--/: @b@rc|jjd}t|dk(r|ddfSt|dk\r,|djs|ddj |ddfSddj |fS)z>Split a doc string into a synopsis line (if any) and the rest. rrKN)striprlenrOjoin)r=liness rsplitdocrZs{ IIK  d #E 5zQQx| Uqq!2Qx59--- tyy rc`|j}|j|k7r|jdz|z}|S)z@Get a class name and qualify it with a module name if necessary.r)r)rrAmodnamer#s r classnamer^s3 ??D G#  3&- Krcd|jvrA|jjdd}|j|k7r|jdz|zS|S|j|k7r |jSy)z_Get a name of the enclosing class (qualified it with a module name if necessary) or module.rrN)r rpartitionrr\s r parentnamerasu f!!!""--c215    '$$s*T1 1K    '$$ $ (rctj|xsqtj|xsZtj|xsCtj|xs,tj |xstj | S)z>Check if an object is of a type that probably means it's data.)rismoduler isroutineisframe istracebackiscode)rAs risdatarhsy  (FGOOF,CF!!&)F-4__V-DF##F+F/6~~f/E GGrcf|r.|dj|j|d}|dd}|r.|S)z/Do a series of global replacements on a string.rTrrUN)rXr)textpairss rreplacerls; Qx}}TZZa12ab   Krct||kDr>td|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 rcramrts` 4y6!fQh]#1fQhsl#DSzE!DT4$999 Krz at 0x[0-9a-f]{6,16}(>+)$c.tjd|S)z>Remove the hexadecimal id from a Python object representation.z\1) _re_stripidrNrjs rstripidrxs ??5$ ''rctj|rytj|r)t|dd}tj|xs|du Sy)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{sQ r:t,$$T*->? U @ z$'(||~r3'  Nrcvg}g}|D]-}||r|j||j|/||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_listrs@ C B  Q< JJqM IIaL  7Nrc*|dvry|jdr|jdry|jdr t|dry|tur.|tvr&t t ||dtjry |||vS|jd 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 HH tt!4Q sY 7 *)>!> gc4. 0C0C D s{??3'''rcg}tj|D]d\}}}}tj|r!d}t|tr!|j d}n|dk(r t |rd}|j||||ff|S)zUWrap inspect.classify_class_attrs, with fixup for data descriptors and bound methods.data descriptorreadonly propertymethod static method)rclassify_class_attrsr2r.r/fsetr{r)rAresultsr#kindr"rs rrr9sG$+$@$@$H tS%  # #E *$D%*uzz/A* X "25"9"DdC/0%I Nrc t|dg} t|Dcic]\}}||t|z c}}fd}|j |ycc}}w#t$riY+wxYw)zGSort the attrs list in-place by _fields and then alphabetically by namerc8j|dd|dfSNr)r)attr field_orders rz!sort_attributes..OsKOODGQ7aArrN)r enumeraterWrGsort)attrsrAfieldsir#keyfuncrs @rsort_attributesrFstVY +F=Fv=NO=N DtaF m+=NO BG JJ7J P  s!AAAA A'&A'ctjj|rIdD]D}tjjtjj |d|zsDyy)z3Guess whether a path refers to a package directory.)z.pyz.pyc__init__TF)r r risfilerX)r exts r ispackagerTsH ww}}T"Cww~~bggll4c1ABC# rc|j}|dddk(s|js-|j}|sn|dddk(r|js-|j}|dddk(r|dd}|dddk(rj|dd}|dddk(r|dd}|js$|j}|sn|js$|jdd j}|Sd}|S) NrT#zr"""rn"""r\r)readlinerVr)filelinerPs rsource_synopsisr\s ==?D r(c/}}U r(c/ ::>99*hAG:ID "--33D9 J'7=~~V^^..034F &/h M)   s*F3 F'4F3 F$#F$'F03F7ceZdZdZdZdZy)ErrorDuringImportzEErrors that occurred while trying to import something to document it.ct|tsBt|tsJt||_||_|j |_||_ ytjdt|\|_|_|_||_ y)NzCA tuple value for exc_info is deprecated, use an exception instance) r.r BaseExceptionrCexcr __traceback__tbwarningswarnDeprecationWarningr)r:rexc_infos rrzErrorDuringImport.__init__ss(E*h 6 66H~DH!DJ,,DG ! MM_, .-5 )DHdj$'  rcl|jj}d|jd|d|jS)Nz problem in  - z: )rr)rr)r:rs r__str__zErrorDuringImport.__str__s&hh+/==#tzzJJrN)r)rrr@rrrrrrsO !Krrcxtjj}t|d5}||j t |k(}dddt jj|}t jj|\}}r!tjj||}n tjj||}tjj|||} tjj|S#1swYxYw#t $r} t#|| d} ~ wwxYw)z> 1 1$V 1 LD+##))$//   +c**+s#D4DD D9( D44D9c |r|tjvrv|tjvrdtjDcgc]}|j|dzs|}}|g|zD])}tj|||<tj|=+t j |}|Scc}w#t $r}|tjvr'ttj|j|t|turt|j|t|tr|j|k(rYd}~yt||d}~wwxYw)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).rN)r rbuiltin_module_namesrr import_modulerrrrC SyntaxErrorrr. ImportErrorr#)r forceloadrmsubsrrrs r safeimportr s/ ,3333 $';;K;a!,,tcz2J;K 6D=C!$S!1E#J C()((. M)L  / 3;; #CKK$5$>$>D D #Y+ %#CLL#6 6 [ )chh$.>$D#. . /s68B(B#B#A B(#B(( E1A?E5 EEceZdZejj ddejddzZd dZ d dZ e xZ xZ xZ xZxZZej$dfdZy) Doc PYTHONDOCSz%https://docs.python.org/%d.%d/libraryNrUcp||f|z} tj|r|j|Stj|r|j|Stj |r|j |S tj|r|j|S|j|S#t$rY>wxYw)z%Generate documentation for an object.) rrc docmoduler docclassrd docroutiner8r2docdatadocother)r:rAr#argss rdocumentz Doc.documents~$  '0E)Ev&}t}}d/C(C  ($1G*G(  # #F +LDLL$4G-Gt}}d##   s#B)#B)#B)) B54B5cnd|xrdt|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.fails6  %S4:% %tF|'<'<>  rstdlibc tj|}tjj d|j }tjj|}t|ttr|jdvs@|j|r|jtjj|ds|jdvr|jdr;dj|jd|jj!}|Stjj||jj!d z}|Sd }|S#t$rd}YYwxYw) z*Return the location of module docs or None (built-in)r) errno exceptionsgcmarshalposixsignalr _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-D doo>''""7+ vtBx ( __!99oog&//"'',,w"HI OO#M M  !89%,,V]]3-?AVAVAXY  ffoo.C.C.E.OP F ' D sE"" E10E1N)r)rrr r+rr version_inforrrrrrr docpropertyr sysconfigget_pathr0rrrrrso G"%"2"22A"6!78J$ ! LPOIOO:OO;(: (:(:8(Drrc<eZdZdZdZdZdZdZdZeZ dZ eZ y) HTMLReprzBClass for safely making an HTML representation of a Python object.cttj|dx|_|_d|_dx|_|_yN drrmaxlistmaxtuplemaxdict maxstringmaxotherr:s rrzHTMLRepr.__init__!1 d')) t} ),,rc $t|ddddddS)N&z&z>)rlr:rjs rescapezHTMLRepr.escape'stS'3VDDrc.tj||Sr1)rrr:rAs rrz HTMLRepr.repr*syyv&&rc Btt|drTddjt|jj z}t||rt ||||S|j ttt||jSNr)repr_r) rrCrXr)rrrJrtrxrrBr:rlevel methodnames rrepr1zHTMLRepr.repr1-sy 47J ' 388DG,<,<,B,B,D#EEJtZ(0wtZ0E::{{4Q 0$--@AArct||j}t|}d|vr/dt|ddvr d|dz|j |z|dzSt j dd|j |S)Nr\\rKrrz-((\\[\\abfnrtv\'"]|\\[0-9]..|\\x..|\\u....)+)z\1)rtrArrlrJrMrNr:rrQtesttestreprs r repr_stringzHTMLRepr.repr_string4s}At~~&: 4)rJrtrxrrAr+r)r:rrQs r repr_instancezHTMLRepr.repr_instanceAsQ G;;tGDG$4dnnEF F G;;1E1EEF Fs 69*A%N) r)rrr@rrJrrSrZrepr_strr^ repr_unicoderrrr7r7s4L- E'B -HG Lrr7c eZdZdZeZej ZejZdZddZ ddZ dZ dZ dZ d Zd Zd Zd Zd ZdZdZdiiifdZddZddZddiifdZdZddiiiddfdZddZeZddZddZy)HTMLDocz'Formatter class for HTML documentation.cd|d|dS)Format an HTML page.zN Python: z z r)r:titlecontentss rpagez HTMLDoc.pageRsH& &rcd|d|xsddS)zFormat a page heading.zU
 
z
 z
r)r:reextrass rheadingzHTMLDoc.heading^s &$H$ & &rNc | 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.zrizz-

z z-decor">z
 
z
z z
z. %s
r) r:rer"rfwidthprelude marginaliagaprPs rsectionzHTMLDoc.sectiongs{  .E1AAIMJ   :sGS::F 8;ZNNFIHTTTrc2d|z}|j|g|S)z$Format a section with a big heading.z&%s)rr)r:rers r bigsectionzHTMLDoc.bigsection|s"85@t||E)D))rc f|j|j}t|dddddddd S)z!Format literal preformatted text. z rrirS
)rJ expandtabsrlrIs r preformatzHTMLDoc.preformats7{{4??,-tVWfg (D(< rwrmz%s
)rWrange)r:listr,rProwscolrs r multicolumnzHTMLDoc.multicolumnsD A !#8C88F48T#Xd]3s4y=#fT!Wo5@F4g%F  ,f44rc d|zS)Nz%srrIs rgreyz HTMLDoc.greys !?$!FFrc8|D]}||vsd||d|dcS|S)z:Make a link for an identifier, given name-to-URL mappings. r)r:r#dictsr5s rnamelinkzHTMLDoc.namelinks)Dt|04T DAA rc |jtjj|j}}t ||r.t |||ur d|jd|dt||dSt||S)zMake a link for a class.r.html#rr)r)r rrrrrr^)r:rAr]r#rs r classlinkzHTMLDoc.classlinkse 8I8I(Jf 64 WVT%:f%Dy'AC C))rcd}|jtjj|j}}t ||rt |||urqd|jvrE|jjdd}|j|k7r|jd|}n$d|z}n|j|k7rd|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 8I8I(Jf 64 WVT%:f%Df)))**55c:1=$$/+1??DAD 4r)r)rLs r modulelinkzHTMLDoc.modulelinks-3__fooNNrc||\}}}}|r|j|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.modpkglinksV*4'dIx 99T? " "&-Cd"C 7$>DD(+T22rcd|d|dS)zMake a link to source file.z%sNrK) rJrMcompilesearchspanrgroupsrlintrrX)r:rjrJfuncsclassesrrherepatternmatchstartendrschemerfcpepselfdotr#rs rmarkupzHTMLDoc.markups&4;;**34~~dD11e1JE3 NN6$tE"23 438<<> 0Cc7DSk))#x8SAB@3s8KVC[IJ9CHDVC[IJCE?c)NN7T]]4-I#IJNN#=#DEc#a%C't}}T7E7KLt}}T7;<D3~~dD11e14 vd45k*+wwwrctd}|D]}t|trq|\}}|dz}||j||z}|rJ||fk7rDg}|D]#} |j|j| |%|dzdj |zdz}|dz}t|t s|d|j ||zz}d|zS) zAProduce HTML for a class tree as given by inspect.getclasstree().rKz

r, )z
z
%s
z
%s
)r.rrrrXr| formattree) r:treer]parentrPentrycbasesparentsr<s rrzHTMLDoc.formattreesE%' 5"==$..G"<<Uvi/ G %t~~dG'DE!&#c\DIIg,>>DF)+E4("3doo7A7'#''!6))rc  |j} |j}|jd}g}t t |dz D]2}|j ddj|d|dzd||d4dj||ddz} d| z} tj|} tjj| } j| | } g}t|d r[t!|j"}|dd d k(r|ddd k(r|d dj%}|j dj'|zt|dr3|j j't!|j(|r| ddj|zz} j+|}|dt-z}nd}j/| d| z|z}tj0|tj2}gi}}tj0|tj4D]Q\}}|tj6|xs||us$t9|||s2|j ||fd|zx||<||<S|D]\}}|j:D]s}|j|j<}}t>j@jC|}||k7s@|sCt||sPtE|||us_||vsd|dz|zx||<||<ugi}}tj0|tjFD]{\}}|-tjH|stj6||us5t9|||sC|j ||fd|z||<tjJ|st||||<}g}tj0|tLD]&\}}t9|||s|j ||f(jOtQ|jR||}|xrd|z}|d|zz}t|drg}tUjV|jXD]\}}} |j ||| df|j[j]|j^}!|jadd|!z}n-|r+j]|fd}!|jadd|!z}|r|Dcgc]\}}| }"}}jctjd|"d|g}!|D])\}}|!j jg|||||+|jad d!d"j|!z}|rUg}!|D])\}}|!j jg|||||+|jad#d$d"j|!z}|rRg}!|D]&\}}|!j jg||(|jad%d&d'j|!z}t|d(rEjOt!|jhjR}!|jad)d*|!z}t|d+rEjOt!|jjjR}!|jad,d-|!z}|S#t$rd}YwxYw#t$rd } YwxYwcc}}w).z/Produce HTML documentation for a module object.NrrTrz.html" class="white">rr!%srr $Revision: $z version %srz (%s)rz-
Module ReferencerKzindex
rrz#-z%sz

%s

rrzPackage Contentsz pkg-contentc,j|dSr})r)tr:s rrz#HTMLDoc.docmodule..^s4??1Q4#8rModulesClassesindexr Functions functionsDatadatarwrAuthorauthorrCreditscredits)6r)__all__r8rr{rWrrXrr*urllibparsequoterrGrrDrrVrJrr0localsrkr~rcr getmodulerrrr rrrrdr-r,rhrrQrypkgutil iter_modulesrrrrrtr getclasstreerrr)#r:rAr#modignoredrpartslinksr linkednameheadr rrinfoversionr/rPrrcdictrrr<r]rrfdictrr=modpkgsimporterispkgrf classlists#` rrzHTMLDoc.docmodule s ..C 3s5z!|$A LL%1+&a2 3%XXeeBCj01 2Z? $%%f-D,,$$T*C}}S$/H 6= )&,,-Gs|11gbclc6I!"R...0 KK t{{7';; < 6: & KK C$89 : 'DIIdO33D'  DvxOFFd$?($JV$ST$$VW-=-=>R!,,VW__EJC""5)3V>sC0NNC<003c 9E#Ju F"JC#}}dooW1d?v'Fvs+t3"e|7>7IC7OOE#Jt ("2u!,,VW5F5FGJC!!%(G,=,=e,D,NsC0LL#u.!%E#J))%0s%,H!,,VV>F H" U eS 9:#doo h 799F 6< ({{3v'8'8#94>>JHdooh(KKF 6= ){{3v'9'9#:DNNKHdooiHMMF ] C  $#H $L.HorizontalRulecd|_yrneedonerCs rrz1HTMLDoc.docclass..HorizontalRule.__init__   rc<|jrdd|_y)Nz
rTrr:pushs rmaybez.HTMLDoc.docclass..HorizontalRule.maybe<<N  rNr)rrrrrsrHorizontalRuler  ! !rrrUz&
Method resolution order:
z
%s

c (t||\}}|rW j||D]:\}}}} t |}j||  |d<|S#t$rj || Y0wxYw)NrSrrrr Exceptionr)msgrrokr#rhomeclsrrrhrmdictrrArr:s rspillzHTMLDoc.docclass..spills#E95IB S 24.D$Q ' 5 T]]5$(-wvwPQJ35L%=T\\%s;<=s A,,"BBct||\}}|r=j ||D] \}}}} j|| "|Sr1rrr rrrrr#rrrrrrr:s rspilldescriptorsz*HTMLDoc.docclass..spilldescriptorsS#E95IB S 24.D$eT37835Lrcdt||\}}|r j||D]\}}}}jt||}t |} | s d|zn;j t |j } d| z} d|| dd|S)Nz
%s
z
%s
rrS)rrrrrQrry)rrrrr#rrrr<r=rrrrrrArr:s r spilldataz#HTMLDoc.docclass..spilldatas#E95IB S 24.D$==)>cJD -C0478"kk&-*/%A@3FdC@AJ35Lrr9r-rc|duSNrUrr thisclasss rrz"HTMLDoc.docclass..AaDI z Methods %sc|ddk(SNrTrrrs rrz"HTMLDoc.docclass.. AaDH$4rzClass methods %sc|ddk(SNrTz class methodrr s rrz"HTMLDoc.docclass.. AaDN$:rzStatic methods %sc|ddk(SNrTrrr s rrz"HTMLDoc.docclass.. AaDO$;rzReadonly properties %sc|ddk(SNrTrrr s rrz"HTMLDoc.docclass..qt7J/JrzData descriptors %sc|ddk(SNrTrrr s rrz"HTMLDoc.docclass..qt7H/HrzData and other attributes %sc|ddk(SNrTrrr s rrz"HTMLDoc.docclass.. !rrK class zz = class r(%s)rN()rvz&%s
 
rern)r)rrrrgetmrorWrrrrrrrrGpopleftrbuiltinsrArrX signature ValueErrorrDrJrQrryrr)#r:rAr#rrrrrealnamerrfrmror<rrrrr"rrrranchor inheritedtagrerdeclr%argspecr=rrrrs#`` ``` @@@@rrzHTMLDoc.docclasss??x   ! ! GNN6*+ s8a< HHJ : ;_t~~d6<6G6G(IIJ O  $   &0DF/K3/K+T4e&1c5)/K 3). %Cw"%*s"2S"8 8E#J -   &e */KKM !!HQK *52MN E9X__,hoo1M!f$$)DNN9;A;L;L-NN 9 C E6 *,,e46E,s2E:D||E7Ha==k3    nI& I s<1M 2 M ?M/M* MM M'&M'*M>=M>cH|jd|j|zSz)Format an argument default value as text.=)rrrLs r formatvaluezHTMLDoc.formatvalue!syytyy0011rc |j} |xs| }||}|dn |jdz|z} d} d} d} t|ri|j}||urt|dd} nt j |rd|j ||z} nd|j |j|z} nkt j|st j|r? |j}|d|j ||z} n||urd |j ||z} n|} t j| rS|Q| j|jk7s| j|jd z| zk7r|j| |}|rd |z} t j |st j"|rd }nd}|| k(r d | d| d}nW|Ht j$|| g|ur/d|jdz| zd| d}d} | j'd rd} n| }d | d|d|}d}t j(|r> t j*|}|r&t1|}| dk(rd|z}|j2s|dd}|sd}||z|j5|z| xr|j7d| zz}| rd|zS|j9t;||j<|||}|xrd|z}d|d|dS#t$rYwxYw#t,t.f$rd}YwxYw) z;Produce HTML documentation for a function or method object.NrKrFr& class method of %s method of %s instance unbound %s method from r from %sasync rz ">rz
%sz
%s
z%
%s
rzr)r)r{r*rrr rr+r1ismethodwrapperr3r8r,rrriscoroutinefunctionisasyncgenfunctiongetattr_staticrrdr%r&rGrD__annotations__rJrrrQry)r:rAr#rrrrrrr'r)noteskipdocsimfuncimselfobjclasspnameasyncqualifierrereallinkr-r%r,r=s rrzHTMLDoc.docroutine%s1??x ?G " s:TA F #__F| T:(,t~~fc/JJ/$..$$c3++((0%%f- D!..:/$..32OODW,#dnnXs&CCDF   f %'*=   !3!3 3   7#7#7##=#H HOOFC0E!E)  ' ' /**62%NN 8 >DhOE&&r8R8FBKK#%0(<??8,D#h(E   V $ !#--f5 i.z)BTIE"11")!B-G% G(<<AHyy?$FGI +d2 2++vwICGACGC15s; ;"  P * !  !s$ K'K) K&%K&)K=<K=cg}|j}|r |d|z|jt||j}|r |d|z|ddj |S)z1Produce html documentation for a data descriptor.z!
%s
z&
%s
rrK)rrrQryrX r:rAr#rrrrrr=s rrzHTMLDoc.docdata~s`~~  5< =kk&.$..9  :S@ A YwwwrcD|xrd|zxsd}||j|zS)z-Produce HTML documentation for a data object.z%s = rKr)r:rAr#rrlhss rrzHTMLDoc.docothers+6/$6<"TYYv&&&rc(g}|i}tj|gD]5\}}}td|Dr|j|d|||vfd||<7|j |j ||j }|j|d|S)z2Generate an HTML index for a directory of modules.c3NK|]}dt|cxkxrdkncyw)iiN)ord.0chs r z HTMLDoc.index..s"@4RFc"g///4s#%rKrTr)rranyrrrrrt)r:rrrrr#rrfs rrz HTMLDoc.indexs  X%,%9%93%%@ !HdE@4@@ NND"eTX-=> ?HTN &A  ##GT__=sGX66rrK)rKNrir1rNNN)r)rrr@r7_repr_instancerrJrgrkrrrtryrrrrrrrrrrrrr1rrr3rrrrrrbrbIs1ZN   D  " "F &&3419U** < 5G*/&O 38#'b"b% R*&sj%)d"b`>D2'+RdW.s5"rDy2~s)rXrIs rboldz TextDoc.boldsww5555rc|sy|jdDcgc]}||zj}}dj|Scc}w)z6Indent text by prepending a given prefix to each line.rKrS)rrOrX)r:rjprefixrrYs rindentzTextDoc.indentsHB6:jj6FG6Fd&4-'')6FGyyHsAct|j|j}|j|dz|zdzS)z&Format a section with a given heading.rSrv)rgrOrd)r:rerfclean_contentss rrrzTextDoc.sections7X.557yy$&7&@@rNc d}|D]}t|trG|\}}||zt|z}|r(||fk7r"fd|D} |ddj| zz}|dz}Zt|tsk||j ||dzz}|S)zBRender in text a class tree as returned by inspect.getclasstree().rKc36K|]}t|ywr1r^)rQrr]s rrSz%TextDoc.formattree..sDeyG4esr rrS )r.rr^rXr|r) r:rr]rrfrPrrrrs ` rrzTextDoc.formattreesE%' 5&9Q+@@Uvi/DeDG#ftyy/A&AAF$E4($//7Av#88 rc  |j}tt|\}}|jd||xrd|zz}t |dd}|j |} | ||jd| dzz}|r||jd|z}g} t j|t jD]D\} } |t j| xs||us$t| ||s2| j| | fFg} t j|t jD]U\} } |-t j| st j| |us5t| ||sC| j| | fWg}t j|tD]&\} } t| ||s|j| | f(g}t}t!|drt#j$|j&D]?\}}}|j)||r|j|d z/|j|A|j+||jd d j-|z}g}t j|t j.D]:\} } | jj1|d zs%| |vs*|j| <|r4|j+||jd d j-|z}| r| D cgc]\} } |  }} } |j3t j4|d|g}| D]'\} } |j|j7| | |)||jdd j-|z}| rRg}| D]'\} } |j|j7| | |)||jdd j-|z}|rTg}|D])\} } |j|j9| | |d+||jdd j-|z}t!|drMt;|j<}|dddk(r|dddk(r|ddj?}||jd|z}t!|dr(||jdt;|j@z}t!|dr(||jdt;|jBz}t!|dr(||jdt;|jDz} t jF|}||jd!|z}|Scc} } w#tH$rd }Y*wxYw)"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 SUBMODULESrTCLASSES FUNCTIONSF)rqDATArrrrrVERSIONrDATErAUTHORrCREDITSrFILE)%r)rZrQrrrr0rr~r rrrrdr-rhsetrrrraddrrXrcrrrrrrDrrVrrrr*rG)r:rAr#rrsynopdescrPrr/rrrrrr modpkgs_namesrr]r submodulesrrfrrs rrzTextDoc.docmodules vf~. tfde.E &FGfi.'  dll+=vI@F dll=$??F!,,VW__EJC%%e,66AsC0NNC<0 F !,,VW5F5FGJC!!%(G,=,=e,D,NsC0LL#u. H !,,VV>F 6: &dll63v3GHHF 6< (dll8S9J9J5KLLF 6= )dll9c&:L:L6MNNF %%f-D$,,vt44 G:@ D s U2U$$ U21U2c  j}|xs|}j}jfd}||k(rdj|z}nj|dz|z}|r#t ||} |ddj | zz}g} | j  tj} | r t| } | r| dk7r|| zdzt} | r | dzttj}t|d kDr(d |D]}d ||zd t!d t"j%Dtj&}t|}d}|rDd|d|D] }d |z||kDrdt||z zdzd Gfdd}|fd}fd}fd}t)Dcgc]\}}}}t+|r||||f}}}}}|r|r|j- n|dd  t/| fd\}}t0j2ur t0j2ur|}V urd}ndt5 jz}t7||d|z|d}|d|z|d }|d!|z|d"}|d#|z|d$}|d%|z|d&}|d'|z|d(}|gk(sJ|}|rdj | } | s|dzS|dzj9| j;d)zdzS#ttf$rd} YwxYwcc}}}}w)*z4Produce text documentation for a given class object.ct||Sr1rl)rr s rmakenamez"TextDoc.docclass..makenameXsQ? "rclass z = class r rNr!rSrUzMethod resolution order:rmrKc3K|]C}|jjds&|jdk(rt|jEyw)rr$N)r)rrrD)rQr"s rrSz#TextDoc.docclass..}s? S*E3LL++C0S^^z5Q *EsA A rrzBuilt-in subclasses:z ... and z other subclassesceZdZdZfdZy)(TextDoc.docclass..HorizontalRulecd|_yrrrCs rrz1TextDoc.docclass..HorizontalRule.__init__rrc<|jrdd|_y)NzF----------------------------------------------------------------------rTrrs rrz.TextDoc.docclass..HorizontalRule.mayberrNrrsrrrrrrc t||\}}|rLj ||D]/\}}}} t |} j|| |1|S#t$r j || YXwxYwr1r) rrrrr#rrrrrrArr:s rrzTextDoc.docclass..spills#E95IB S 24.D$E ' 5 T]]5(,c67DE35L%=T\\%s;<=s A!!"BBct||\}}|r=j ||D] \}}}} j|| "|Sr1rrs rrz*TextDoc.docclass..spilldescriptorsrrc t||\}}|r[ j ||D]>\}}}}t|} t |}  j | | d|dz@|S#t$r|j |} Y=wxYw)Nrurqr=rS)rrrQrr8__dict__r)rrrrr#rrrr=r9rrrArr:s rrz#TextDoc.docclass..spilldatas#E95IB S 24.D$ -C5%fd3sD#bcJ 35L *5%..t45s A00B  B rrc|duSrrrs rrz"TextDoc.docclass..rrr r z Methods %s: c|ddk(Sr rr s rrz"TextDoc.docclass..rrzClass methods %s: c|ddk(Srrr s rrz"TextDoc.docclass..rrzStatic methods %s: c|ddk(Srrr s rrz"TextDoc.docclass..rrzReadonly properties %s: c|ddk(Srrr s rrz"TextDoc.docclass..rrzData descriptors %s: c|ddk(Srrr s rrz"TextDoc.docclass..rrzData and other attributes %s: c|ddk(Srrr s rrz"TextDoc.docclass..rrz | )r)rrrdmaprXrrr%r&rGrDrQrr"rWsortedrC__subclasses__r-rrr#rr$rAr^rrgrO)!r:rAr#rrr'rrrerrfr%r-r=r(r< subclassesno_of_subclassesMAX_SUBCLASSES_TO_DISPLAY subclassnamerrrrrr"rrr*r+rrrs!`` ` @@@rrzTextDoc.docclassRs??x   ++ # 8 tyy22EIIdOk1Hrrdr%r&rGrDr?rQrgrO)r:rAr#rrrr'r@rArBrCrDrErFrer-r%r,r=s rrzTextDoc.docroutines??x ?G F #__F| T:(,y/EE/)$$c3++((0%%f- ?!..:/)Hc2JJDW,#i#&>>DF   f %'*=   !3!3 3   7#7#7##=#H Hvs+E!E)  ' ' /**62%NN 8 IIh'E&&r8R8FB??8,DIIdOe+h6E   V $ !#--f5 i.z) IIdOj8E"11")!B-G%/$6 $; .&BC$;#"J$++c*:*A*A*Cd*JK Ko"  H * !  !s$0 J+J JJJ,+J,cg}|j}|r||j||dt|xsd}|r||j||ddj |S)z1Produce text documentation for a data descriptor.rSrK)rrdrQrgrXrIs rrzTextDoc.docdata?sb~~  4 ! JVn"  S! " Jwwwrrc$|j|}|r+|xr|dzxsd|z} |t| z } | dkr|d| dz}|xr|j|dzxsd|z} |s t|}|r#| d|j t |zdzz } | S)z-Produce text documentation for a data object.rrKrNrorS)rrWrdrQrgrD) r:rAr#rrrqr=rrrchops rrzTextDoc.docotherOsyy  )TE\/R47DCI%DaxUd e 304506B$>.C  D4;;s3x0047 7D r)rm)NrKr)NNNNrW)r)rrr@rZrXrrdrgrrrrrr1rrr3rrrrr`r`se1ZN   D6 A cJXLt'ML^  K $ rr`ceZdZdZdZy) _PlainTextDocz2Subclass of TextDoc which overrides string stylingc|Sr1rrIs rrdz_PlainTextDoc.bold`s rN)r)rrr@rdrrrrr^s <rrc.tat|y)zCThe first time this is called, determine what kind of pager to use.N)getpagerpagerrws rrres JE $Krc^ttjdstSttjdstStjj rtjj stStj dk(rtStjjdxstjjdrCtj dk(rfdStjjddvrfd Sfd StjjddvrtStj dk(rd Sttd rtjd dk(rdSddl }|j\}}tj| ttd r3tjd|zdk(rdtj|Sttj|S#tj|wxYw)z2Decide what method to use for paging through text.isatty emscriptenMANPAGERPAGERwin32c.tt|Sr1 tempfilepagerplainrj use_pagers rrzgetpager..xs eDk9 ErTERM)dumbemacsc.tt|Sr1) pipepagerrrs rrzgetpager..zs %+y Arct|Sr1rrs rrzgetpager..|s $ :rc,tt|dS)Nzmore .sM%+x@rsystemz(less) 2>/dev/nullrct|dS)Nlessrrws rrzgetpager..s IdF3rNz more "%s"ct|dS)Nmorerrws rrzgetpager..s $ 7r)rr stdin plainpagerstdoutrplatformr r+rrtempfilemkstempcloseunlinkttypager)rfdrrs @rrrks 399h ' 3::x ( 99   SZZ%6%6%8 |||# z*EbjjnnW.EI <<7 "E E ZZ^^F #'8 8A A: : zz~~f!22 ||w@@r8+?!@A!E33%%'NRHHRL 2x RYY{X/E%F!%K7 ( ( (s7-H:HH,c0tjdd|S)z%Remove boldface formatting from text.z.rK)rMrNrws rrrs 66%T ""rc2ddl}|j|d|jd} |j5} |j |ddd |jy#t $rY&wxYw#1swY+xYw#t $rY9wxYw#t $rYnwxYwL)z3Page through text by feeding it to another program.rNTbackslashreplace)shellrerrors) subprocessPopenPIPErwriteKeyboardInterruptrwait)rjcmdrprocpipes rrrs   Ct:??#5  7D  ZZ4  4    IIK %  Z    !    sW A:A.AA:B  A+(A.*A++A..A73A:: BB BBc ddl}|j5}tjj |d}t |ddt jdk(rtjdnd5}|j|dddtj|dz|zd zdddy#1swY0xYw#1swYyxYw) z.s#))..+rcJtjjddddS)NrrT)r rrrrrrzttypager..s#)),,.s3BQ7rLINESrTz -- more --)qQz ) rS)bB)rrrttyr rfileno tcgetattr setcbreakrr8ioUnsupportedOperationrr r+rr&rrrXflush tcsetattr TCSAFLUSH) rjrYrroldgetcharhrVincrs rrrs .& ' - -d 3E8 YY   mmB b+ 2 BJJNN7A./A 6Aa%C 5#;/$67ABi JJ  \ * JJ    AJ   !12l"   !1E!H!Simply print unformatted text. This is the ultimate fallback.N)r rrrrrws rrrsJJU>$/01rchtj|rU|jtjvrd|jzSt |drd|jzSd|jzStj |rd|jzStj|r=d|jjd|jjd|jStj|r=d|jjd|jjd|jStj|rd |jzStj|rd |jzStj|rd |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 rdescribersW >>S55 5%6 6 5* %. .u~~- -#enn44!!%(    ) )5+=+=+F+F NN !!%(    ) )5+=+=+F+F NN u%..((% U^^++5>>)) ;  rcR|jdDcgc]}|s| }}d\}}|t|kr;tdj|d|dz|}|r||dz}}nn|t|kr;|r|}nt}||dD]} t ||}|Scc}w#t $rYywxYw)z@Locate an object by name or dotted path, importing as necessary.rrNrT)rrWr rXr$rr8)r r partrrn nextmodulerAs rlocaters"jjo 6odToE 6IFA c%j.t! 5yA :q1uqv c%j.ab  VT*F M 7  sBB B B&%B&ct|tr t||}|td|z||fSt |dd}|t|tr|fSdfS)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.rDrrr)rr rAr#s rresolver  so%y) >,/445 5u}uj$/js3d====rc(|t}t||\}}t|}tj|}|rd|vr|d|d|j dzz }n|r||ur|d|j zz }tj|sstj|s^tj|sItj|s4t|s)t|dr |j}nt|}|dz }||zdz|j||zS)zBRender text documentation, given an object or a path to an object.Nrz in z in module __origin__z objectrv)rjr rrrrfindr)rcr rdr2rIrr rCr)rrer rendererrAr#rrs r render_docr.s5),LFD F D   v &F t  .tzz#/// F&( //   V $oof%'&&v.fo 6< (&&F&\F I D 4<& 8#4#4VT#B BBrc | tt|||y t|||t}|j |y#t$r}|rt|Yd}~yd}~wwxYw#t$r}t |}Yd}~Od}~wwxYw)zCDisplay text documentation, given an object or a path to an object.N)rrrprint plaintextrDr)rrer outputis_clirrs rr=r=Is|~  *UE95 6  5%I>A  Q  #JJ  CA s.AA$ A! AA!$ B- A==Bct||\}}tjt|tj ||}t |dzdd5}|j |dddtd|dzy#1swYxYw)z" 5 4s A>>Bcb|i}tj|g|D]\}}}t|y)zAWrite out HTML documentation for all modules in a directory tree.N)r walk_packagesr)rpkgpathdonerr]rs r writedocsrbs7 |BT$+$9$93%$I '5%J rcTeZdZiddddddddddd d d d d dddddddddddddddddddid d!d"d#d$d%dd&d#d'd(d)d*d+d,d-d.d/d0dd1dd2d3d4d5d6d7dd8d9d:dd;dDcgc]}d?D]}||z c}}}Zd@dAdBdCgedDdEdFdGdHdIdJZdKdLdMdNdOdPdQdRdSdTdUdVdVdWdWdXZejD]/\ZZ e D]%Z eje eZ ee vre dYzezZ e ee <'1[[ [ [ 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݄ZddބZd߄ZdZdZddZddZdZddZ ycc}}}w)HelperFalserKNoneTrueandBOOLEANaswithassert)r&rKasync)r'rKawait)r(rKbreak)r) while forclass)r+zCLASSES SPECIALMETHODScontinue)r,r*def)functionrKdel)r/ BASICMETHODSelififelse)r3r*excepttryfinallyfor)r7zbreak continue whilefromimportglobal)r:znonlocal NAMESPACES)r2 TRUTHVALUE)r9MODULESin)r=SEQUENCEMETHODSis COMPARISONlambda)rArtnonlocal)rBzglobal NAMESPACESnotorpass)rErKraise)rF EXCEPTIONSreturn)rHrt)r5rGwhile)rIzbreak continue if TRUTHVALUE)r%z CONTEXTMANAGERS EXCEPTIONS yieldyield)rJrK)rfrVu'rrNz'''rr)+r***r(z//%<<>>rF|^~rGrH<=>===!=<>)rGrHrXrYrZr[r\)rrW) z+=z-=z*=z/=z%=z&=z|=z^=z<<=z>>=z**=z//=)rSrTrFrUrVrW)jJ)STRINGS OPERATORSr@UNARYAUGMENTEDASSIGNMENTBITWISECOMPLEXzOPERATORS FORMATTINGPOWERzTUPLES LISTS FUNCTIONSz ATTRIBUTES FLOAT MODULES OBJECTSELLIPSISzSLICINGS DICTIONARYLITERALSz def classr_ PRIVATENAMESzPRIVATENAMES SPECIALMETHODS BACKQUOTESzTUPLES FUNCTIONS CALLSzLISTS SUBSCRIPTS SLICINGS)rRrQ,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) formatstringsr`UNICODE)rqz:encodings unicode SEQUENCES STRINGMETHODS FORMATTING TYPESNUMBERS)numberszINTEGER FLOAT COMPLEX TYPESINTEGER)integersz int rangeFLOAT)floatingz float mathrd) imaginaryz complex cmath SEQUENCES)typesseqz$STRINGMETHODS FORMATTING range LISTSMAPPINGS DICTIONARIESrt)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) specialattrsrKrs)rpz!class SPECIALMETHODS PRIVATENAMESr<) typesmodulesr9PACKAGES EXPRESSIONS)zoperator-summaryzlambda or and not in is BOOLEAN COMPARISON BITWISE SHIFTING BINARY FORMATTING POWER UNARY ATTRIBUTES SUBSCRIPTS SLICINGS CALLS TUPLES LISTS DICTIONARIESr` PRECEDENCEOBJECTS)objectsroSPECIALMETHODS) specialnameszbBASICMETHODS ATTRIBUTEMETHODS CALLABLEMETHODS SEQUENCEMETHODS MAPPINGMETHODS NUMBERMETHODS CLASSESr0) customizationzhash repr str SPECIALMETHODSATTRIBUTEMETHODS)zattribute-accesszATTRIBUTES SPECIALMETHODSCALLABLEMETHODS)zcallable-typeszCALLS SPECIALMETHODSr>)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-featuresrKSCOPINGFRAMESrG)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) subscriptionsr>r)slicingsr>CALLS)callsr)powerrra)unaryrBINARY)binaryrSHIFTING)shiftingrrc)bitwiser) comparisonszEXPRESSIONS BASICMETHODS)booleanszEXPRESSIONS TRUTHVALUE ASSERTION ASSIGNMENT) assignmentrbrb) augassignrDELETION RETURNING IMPORTING)compoundzfor while break continue)truthz if while and or not BASICMETHODS)debuggerpdb)zcontext-managersr%) CONDITIONALLOOPINGr; DEBUGGINGCONTEXTMANAGERSNc ||_||_yr1)_input_output)r:inputrs rrzHelper.__init__s  rc>|jxstjSr1)rr rrCs rrz Helper.inputs{{'cii'rc>|jxstjSr1)rr rrCs rrz Helper.output!s||)szz)rctjdddk(r|yd|jjd|jjdS)NrTrn?rKrGrz instance>)rstackr+rrrCs r__repr__zHelper.__repr__%sO ==?1 a C ' F (&*^^%>%>%)^^%@%@B Brc$||jur |j|y|j |j |jj dy#t$r(}|jj |dYd}~yd}~wwxYw)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. )_GoInteractiverrrrintrointeract)r:requestrs r__call__zHelper.__call__-sy $-- - . '" JJL MMO KK     . !!SE*-- .sA B'B  Bc|jjd |jd}|sy |j }t |dkDr"|d|dcxk(rdvrnn|d|ddvr|dd}|jdvry|d k(r|jn|j|#ttf$rYywxYw) NrSzhelp> rUrrrMrT)rquitr) rrgetlinerEOFErrorrVrWr-rr)r:rs rrzHelper.interact=s $ ,,x0wmmoGG q WQZ72;%L*%L '!B-7!!B-}}-/&   '"#&x0  sB..C?Cc|jtjur t|S|jj ||jj |jj S)z.Read one line, using input() when appropriate.)rr rrrrr)r:prompts rrzHelper.getlineRsQ :: "= KK  f % KK   ::&&( (rcnt|trX|j}|dk(r|jnb|dk(r|j nK|dk(r|j n4|dk(r|j n|dddk(r#|j |jdn||jvr|j|n|dvr#tt|d |j| n||jvr|j|n||jvr|j|nk|rt|d |j| nOttd |j| n1t|t r|nt|d |j| |j"j%d y) Nkeywordssymbolstopicsrzmodules rT)r!rr z Help on %s:)rrrS)r.rDrV listkeywords listsymbols listtopics listmodulesrr showsymbolr=evalrr showtopicrrrr)r:rrs rrz Helper.help[sE gs #mmoG*$d&7&7&9I%t'7'7'9H$doo&7I%t'7'7'9! *  !34DLL($//'*B55DM=fUDMM)4>>'+BDKK')@#g}T\\RXYc=fM  ($&'=fM $rc|jjdjdtjddzy)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)rrr,r r2rCs rrz Helper.introps7   F7S%%bq) )*! ,rc tt|}||z}t||zdz |z}t|D]}t|D]s}||z|z}|t|ks|jj ||||dz ksA|jj dd|dz t||z zzu|jj dy)NrTrrS)r|rrWr{rr) r:itemscolumnsrncolwr}rowr~rs rr|z Helper.listsVE]#E W$q(W4;CW~$J$s5z>KK%%eAh/Wq[( ))#tax#eAh-7O0P*PQ & KK  d #rc|jjd|j|jj y)NzN Here is a list of the Python keywords. Enter any keyword to get more help. )rrr|rrrCs rrzHelper.listkeywordss4   $--$$&'rc|jjd|j|jj y)Nzx Here is a list of the punctuation symbols which Python assigns special meaning to. Enter any symbol to get more help. )rrr|rrrCs rrzHelper.listsymbolss4   $,,##%&rc|jjd|j|jj y)NzN Here is a list of available topics. Enter any topic name to get more help. )rrr|rrrCs rrzHelper.listtopicss4   $++""$%rc^ ddl}|jj ||j j |}|s(|jjdt|zyt|tr|j||S|\}} |jj|}|jdz}|r |xsddz|z}|rRddl }ddj|jzdz} |j!| d } |d dj| zz }|j" t%|y|jj|y#t$r|jjdYywxYw#t$r*|jjdt|zYywxYw) Nrt Sorry, topic and keyword documentation is not available because the module "pydoc_data.topics" could not be found. zno documentation found for %s rSrKrRelated help topics: rHz %s )pydoc_data.topicsrrrrrrrr.rDrKeyErrorrVtextwraprXrwraprr) r:topic more_xrefs pydoc_datatargetlabelxrefsr=rrj wrapped_texts rrzHelper.showtopics  $ (9(9%(@A KK  ?$u+M N  fc ">>&*5 5 u ##**51CiikD  [bC'*4E  *TYYu{{}-EELD#==r2L 8dii 55 5C <<  #J KK  c "?  KK         KK  ?$u+M N  s#E E9$E65E690F,+F,cR ddl}|jj||jj|}|s t dt |tr|j||S|\}}|jj|}|r |xsddz|z}||fS#t$rYywxYw)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)rrKzcould not find topicrKr) rrrrrr&r.rD _gettopic)r:rrrrrrr=s rrzHelper._gettopics $  (9(9%(@A34 4 fc ">>&*5 5 u&&u- [bC'*4EEz   sB B&%B&cp|j|}|jd\}}}|j||y)Nr)r partitionr)r:symbolrrrrs rrzHelper.showsymbols4f% **3/q% ue$rcn|r6|jjdj|t|y|jjdi}|fdfd}t j ||j |j|jjdy)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|dddk(r|dddz}|jddkrd||<yy)N .__init__rqrrrT)find)r r]rrs rcallbackz$Helper.listmodules..callbacksBwrs|{:%crl\9G<<$q('(GG$)rcd|dyr1r)r]rs ronerrorz#Helper.listmodules..onerrorsw-rrz Enter any module name to get more help. Or, type "modules spam" to search for modules whose name or summary contain the string "spam". )rrr,apropos ModuleScannerrunr|r)r:rrrrs @rrzHelper.listmoduless  KK   F3K   CL KK   G6= )  . O  '  : IIglln % KK   rr)F)rPrU)!r)rrr _strprefixes_symbols_inverserrrsymbols_r rrrr/rrrrArrrrrrr|rrrrrrr)rQprs000rrrise$$$ $ 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)U* )+U, 9-U. 1/U0 A1U2 -3U4 H5U6 .7U> ]?U@ mAUB 'CUD 4EUJ IKUL MMUN EOUP /QUT GUUV ,WUZ K[U\ W]U^ 3_U` {U| ?}U~ ZU@ :AUB 3CUD )EUF )GUH )IUJ +KUL /MUN -OUP AQUR 9SUT XUUV ;WUX =YUZ E[U\ X]U^ X_U`;C(7iUFn((**BXN- #*) *,& $('&"#H6% [ Ms9H#rceZdZdZddZy)rz7An interruptible scanner that searches module synopses.Nc|r|j}d|_i}tjD]|}|dk7s d||<| |d|dt |j xsd}|j dd}|dz|z}|jj|dk\ss|d||~tj|D]0\} }} |jrn| |d|d$ | j|} | j} t| d rU | j|} t!t#j$| xsd}t| d r| j'|}n[d}nX t(j*j-| }|j r|j j1dnd}t3|d d}|dz|z}|jj|dk\s'||||3|r|yy#t$rYKwxYw#t$r|r||YewxYw#t.$r|r||YwxYw) NF__main__rTrKrSrrr get_source get_filenamer)r-rr r __import__r@rrrr find_specrrrr rrrStringIOr!rrrrrr)r:rr completerrseenr]r#rrrrrsourcer rs rrzModuleScanner.run s= ciik //G*$ !W ;T7B/%g.66<"D::d+A.D"U?T1Dzz|((-2 w50)0(=(=g(N(N $Hguyy{w+#--g6D6<0!!'!2!27!; +2;;v+>?E2Dv~6%227;#!!*!5!5!;!;D!A >D^^6>>446q9QSD"6*T:D-::<$$S)Q.T7D1I)OL  K ;#%!"#G, !'!"#G, !s6&HH%H* H  H H'&H'*IIrW)r)rrr@rrrrrr s A8rrcd}d}tj5tjdtj |||dddy#1swYyxYw)zAPrint all the one-line module summaries that contain a substring.cJ|dddk(r|dddz}t||xrd|zyNrrrqz- )r)r r]rs rrzapropos..callbackG s3 23<; &crl\1G gt+t ,rcyr1rr]s rrzapropos..onerrorK s rignorerN)rcatch_warningsfilterwarningsrr)rrrs rrrE sI-  ")Hc7; # " "s 2AAc ddlddlddl ddl Gddjj G fddjj G fdd j}||||}|j|jsS|jr |js;tjd |js|js.|js;|S) aAStart an HTTP server thread on a specific port. Start an HTML/text server thread, so HTML or text documents can be browsed dynamically and interactively with a web browser. Example use: >>> 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 rNceZdZdZdZy)!_start_server..DocHandlerc8|jjdrd}nd}|jd|jdd|z|j |j j |j|j|jdy) 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 yy!!&)) *   s #   ^-@<-O P     JJ  T__ <))/ :rcyr1r)r:rs r log_messagez-_start_server..DocHandler.log_message s rN)r)rrr=r?rrr DocHandlerr2 s  :  rr@c$eZdZdZfdZdZy) _start_server..DocServerc||_|j|f|_||_|jj ||j|j d|_yNF)hostaddressrr<rhandlerr)r:rEportrs rrz)_start_server..DocServer.__init__ sEDI IIt,DL$DM II  tT\\4<< @DIrc|jsPj|jjgggd\}}}|r|j |jsP|j yr})rselectsocketrhandle_request server_close)r:rdwrexrJs rserve_until_quitz1_start_server..DocServer.serve_until_quit sZii#]]DKK,>,>,@+A2r1M B'')ii    rcv|jj||jr|j|yyr1)r<server_activaterrCs rrSz0_start_server..DocServer.server_activate s, II % %d +}} d#rN)r)rrrrQrS)rJsr DocServerrB s   $rrTc4eZdZfdZfdZdZdZy)#_start_server..ServerThreadc||_||_t||_jj |d|_d|_d|_yrD) r;rErrHThreadrservingerror docserver)r:r;rErH threadings rrz,_start_server..ServerThread.__init__ sE(DODID DI    % %d + DLDJ!DNrcn jj__jj _t|j_|j|j|j}||_ |jy#t$r}||_Yd}~yd}~wwxYw)zStart the server.N)server HTTPServerr<rGrMessage MessageClass staticmethodr;rErHreadyr[rQrrZ)r:docsvrrr@rTemailhttps rrz'_start_server..ServerThread.run s !!%!7!7 $. !*/--*?*? '(4T__(E %"499diiD!''') !   !sBB B4#B//B4cd|_|j|_|j|_d|j|jfz|_y)NTz http://%s:%d/)rYrE server_portrHr)r:r^s rrcz)_start_server..ServerThread.ready s:DL DI**DI&$))TYY)??DHrcpd|j_|jd|_d|_d|_y)z&Stop the server and this thread nicelyTNF)r[rrXrYrrCs rstopz(_start_server..ServerThread.stop s."&DNN  IIK"DN DLDHrN)r)rrrrrcrj)r@rTrerfr\sr ServerThreadrV s " ! @  rrkg{Gz?) http.server email.messagerJr\r^BaseHTTPRequestHandlerr_rXrrZrYr[timesleep) r;hostnamerHrkthreadr@rTrerfrJr\s @@@@@@r _start_serverrsS spT[[77,$DKK**$*&&y''&P*h 5F LLNllFNNv7G7G 3llFNNv7G7G Mrc^ G fddt}|fd fd fd fdfd fdfd  fd  fd }|jd r|d d}|dk(rtjj tjj t }tjj||}t|5}dj|jcdddS|dk(r||Std|d|#1swYxYw)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. ceZdZfdZy)_url_handler.._HTMLDocc :d}d|z}d|d|dd|d S)rdzpydoc_data/_pydoc.cssz1zH Pydoc: z z z*
z
r)r:rerfcss_pathcss_link html_navbars rrgz#_url_handler.._HTMLDoc.page s/.HC HkmX? ?rN)r)rrrg)rzsr_HTMLDocrv s ?rr{cjtjdtjddtjd}d|djtjdd S) Nz [rrrnz=
Python 
T)tersea
)rJrpython_version python_buildpython_compiler)rrs rrzz!_url_handler..html_navbar sg++x/F/F/H/7/D/D/Fq/I/7/G/G/IKL0DKK(9(9(EF+H Hrcd}jd}tjDcgc] }|dk7r| }}j||}|dj dd|zg}i}tj D]#}|j j||%|j ddd j|fScc}w) zModule Index page.cd|d|dSNrrrrr#s r bltinlinkz3_url_handler..html_index..bltinlink' 15t< Index of Modules
rz

zBuilt-in Modulesrzf

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

zIndex of ModulesrK) rkr rrrtr rrrX)rrkr#namesrfr&rrs r html_indexz _url_handler..html_index$ s =,, = #&":":(":$J&":(##E95UT__ &33488C OODJJsD1 2  ' ("2778#444(sB>c g fd}tj5tjdd}tj |||dddd}g} j d} D]\}}|j |||z!| jd|zd d j|z}d |fS#1swYoxYw) zSearch results page.cZ|dddk(r|dddz}j||xrd|zfyr*r)r r]r search_results rrz3_url_handler..html_search..callbackA s=rs|{*!#2,5  '4+?D4K!@ Arr-cyr1rr,s rrz2_url_handler..html_search..onerrorH srrNcd|d|dSrrrs rrz4_url_handler..html_search..bltinlinkM rrz-Search Resultszkey = %srr}zSearch Results) rr.r/rrrkrrtrX) rrrrrrkr#rrfrrs @r html_searchz!_url_handler..html_search< s  B  $ $ &  # #H -  O  #w  ? ' =,, ; (JD$ NN9T?T1 2(T__  gv{{7';==))%' &s 5CC cd}jd}ttjj }j ||}|j dd|z}d|fS)zIndex of topic texts available.cd|d|dSNzINDEXTopicsr)rkrrrrrrt)rrkrrfrs r html_topicsz!_url_handler..html_topicsZ sn B,, 2 v}}))+,##E95T__ gx))!!rcjd}ttjj }d}j ||}|j dd|z}d|fS)zIndex of keywords.rcd|d|dSrrrs rrz6_url_handler..html_keywords..bltinlinkq rrKeywordsr)rkrrrrrrt)rkrrrfrs r html_keywordsz#_url_handler..html_keywordsj sn,, 2 v++-. B##E95T__ ++8##rctj}t||}|j|\}}||jvrd}nd}j d|z}dj |z}j|d|}|rAt|j}d}j||}jdd|}|d|d j|||ffS) zTopic or keyword help page.KEYWORDTOPICrz
%s
rcd|d|dSrrrs rrz7_url_handler..html_topicpage..bltinlink s :>EErrrrK) rr$rrrrkrrtrrrrrrX) rbufhtmlhelprfrrerkrrs rhtml_topicpagez$_url_handler..html_topicpagey skkm#s#",,U3% H%% %EE,, /% 7 #T[[%::??57H= 5;;=)E F$$UI6ELL!8'5IE %((E235 5rct|d}||dk7r tdt|}j||}||fS)NrT)r r zcould not find object)rr&rr)rr9recontentrs r html_getobjz!_url_handler..html_getobj sISA& ;3&=45 5 --S)g~rcjd}djfdtt||D}|j |d|z}d|z|fS)Nz$Errorr}c3@K|]}j|ywr1)rJ)rQrrs rrSz3_url_handler..html_error.. s#FD6:t{{40DsrZz Error - %s)rkrXrrCrt)rrrkrfrs r html_errorz _url_handler..html_error sf,, 2 ;;F4T#YDFFT__S'8DDc!8++rcJ|}|jdr|dd} |dvr  \}}n|dk(r \}}n|dk(r  \}}nsd|vrd|jd\}}}|dk(r  |\}}nI|d k(r  |\}}n7|d k(r|dvr  \}}n#  |\}}ntd  |\}}j ||S#t$r |\}}Y(wxYw#t$r |\}}YBwxYw#t$r}||\}}Yd}~`d}~wwxYw) zGenerate an HTML page for url.r)N)rKrrrr0z search?keyz topic?keyzget?keyz bad pydoc url)rr r&rrg)r complete_urlreroprrrrrrrrrrs r get_html_pagez#_url_handler..get_html_page sf << cr(C ;m#!+w!,w "!.w ]]3/ As%%0%5NE7;&:)7)<w9_m+)3wA-8-=NE7%_55!,S!1wyy((%&:)4S)9w: *A-;C-@NE7A  ;' c:NE7 ;s`AD: CD C)&DC&#D%C&&D)D=D?DD D" DD"r(rTNr4rKr5zunknown content type z for url ) rbrr r dirnamerealpathrrXr readlinesrG)rr<r{r path_hererxfprrrrrrzrrrs @@@@@@@@@r _url_handlerr s?7?$ :DH650*<" $52,&)&)P ~~c!"gz!GGOOBGG$4$4X$>? 77<< 3/ (^r772<<>* + +  $S!! L#N OO ^s D##D,T localhost) open_browserrqcddl}tt||}|jrt |jy|j rd}|r|j |j t d|jt ||j rZtd}|j}|dk(rn9|dk(r|j |jn t ||j rZ|j r|jt dyyy#ttf$r t YEwxYw#|j r|jt dwwxYw) 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) webbrowserrsrrZrrYrrrr-rrrj)rHrrqr serverthreadserver_help_msgrs rbrowser s/  x>L l  !>  OOL,, - ( #\%5%5 6 / "&&J'iik#:CZOOL$4$45/*&&##!!#&'$' "8,  G ##!!#&'$s%$BDD1.D40D11D44*Ecjt|txr"|jtjdk\Sr)r.rDrr sep)rs rispathr s% a  5!&&.A"55rcd|vs(tj|vstj|vrytjj t }tjj |}|j }||vr1tjj||s|j||jdtj|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 Z299 2biikZ6O*J'J??$LZ(8(8Z(PJ'299;' rcttjtjd}||tjddyy)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 s4 %SXXsxx{;L"  rcddl}Gddt}t |jtjddd\}}d}d}d}d}d}|D]:\} } | d k(rd }d }| d k(r t | y| d k(rd }| }| d k(rd }| dk(s7d }| }<|rt |||y|s||D]} t| rBtjj| s#td| ztjd t| r*tjj| r t| } |rBt| r+tjj| r t!| n#t#| nt$j%| d y#t&t(f$r+} t| tjdYd} ~ d} ~ wwxYw#|j*|f$r}tjj-tjj/tjdd} tdj1| tj2YywxYw)z@Command-line interface (looks at sys.argv to decide what to do).rNc eZdZy)cli..BadUsageN)r)rrrrrBadUsager) srrrTzbk:n:p:wFrz-bTz-kz-pz-wz-n)rqrzfile %r does not exist)rapydoc - 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 rrrrr r existsrexitrrrrrrrrrZrrr,r)rroptsrwriting start_serverrrHrqoptvalargrrs rclir& s#9#M!]]388AB<< d  HCd{# # d{ d{# d{d{#   4( F 8^Cc{277>>##6.45  #;277>>##6$S/Cc{rww}}S'9!#  IIc$I/ !23 e    LL( #!ggrww// <=a@ : FsF; !!sQAG2GGAG6BF G G F>8G>GGB IIrr)r) Python Library Documentation: %srN)rrNF)rKN)r5)cr@rrrrrr$importlib._bootstraprimportlib._bootstrap_externalimportlib.machineryimportlib.utilrrr rrrMr r4ror urllib.parserr collectionsrreprlibr tracebackrrr$r>r7rIrQrZr^rarhrlrtr IGNORECASErvrxr{rrr|all_feature_namesrrrrrrrrrrr rr7rbrZr`rrrrrrrrrrrrjrrr rr=rrrrrrrsrrrrrrr)rrrrs`%L ( )  $   + 1f ! A   %G bjj5r}}E ( "J889(0  " %NK K&+$ !(X66t(t(TW 7cW 7v:t:@XcXt G "H#0 /F *2X2 6*y O y >KLC6DE!"# [[z x;;z <VriPX (4+ (J68#T!l zEr