python (3.12.0)

(root)/
lib/
python3.12/
__pycache__/
pydoc.cpython-312.pyc

ˑe~dZdgZdZdZdZddlZddlZddlZddl	Zddl
ZddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlmZddlmZdd	lmZd
ZdZ dZ!d
Z"dZ#dZ$dZ%dZ&dZ'dZ(dZ)ejTdejVZ,dZ-dZ.dZ/dZ0e1ejdZ3dOdZ4dZ5dZ6dZ7dZ8ifdZ9Gd d!e:Z;d"Z<difd#Z=Gd$d%Z>Gd&d'eZ?Gd(d)e>Z@Gd*d+eZAGd,d-e>ZBGd.d/eBZCd0aDd1ZEd2ZFd3ZGd4ZHd5ZId6ZJd7ZKd8ZLdPd9ZMeBZNeCZOe@ZPdPd:ZQ		dQd;ZR		dRd<ZSdPd=ZTdSd>ZUGd?d@ZVeVZWGdAdBZXdCZYdDZZdTdEZ[dPdFdGdHdIZ\dJZ]dKZ^dLZ_dMZ`eadNk(re`yy)UaGenerate 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 <name>" to show documentation on something.  <name> 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 <keyword>" to search for a keyword in the synopsis lines
of all available modules.

Run "pydoc -n <hostname>" to start an HTTP server with the given
hostname (default: localhost) on the local machine.

Run "pydoc -p <port>" 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 <name>" to write out the HTML documentation for a module
to a file named "<name>.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 <ping@lfw.org>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    9/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/pydoc.pypathdirsrRs
DHxx%ggoocjS)''""3'("rww}}S'9KKOOG$%Kctjj|j}|y|jjdddD]}t
||}tj|sy|S)Nr)	r	modulesget
__module____qualname__splitgetattrinspectisclass)funcclsnames   r
_findclassr$^sg

++//$//
*C
{!!'',Sb1!c4 !??3Jrc~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||3S(%%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c3C  		*		sAAAct|xstj|}|xr%tjdd|jxsdS)z-Get the doc string or comments for an object.z^ *
)rIrgetcommentsresubrstrip)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---
tyyrc`|j}|j|k7r|jdz|z}|S)z@Get a class name and qualify it with a module name if necessary.r)r)r)rAmodnamer#s   r	classnamer]s3??D
G#  3&-Krctj|xsqtj|xsZtj|xsCtj|xs,tj
|xstj|S)z>Check if an object is of a type that probably means it's data.)rismoduler 	isroutineisframeistracebackiscode)rAs risdatardsy  (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  rreplacerhs;
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)rfmaxlenpreposts    rcramrps`
4y6!fQh]#1fQhsl#DSzE!DT4$999Krz at 0x[0-9a-f]{6,16}(>+)$c.tjd|S)z>Remove the hexadecimal id from a Python object representation.z\1)_re_stripidrNrfs rstripidrts??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-rr_)fnr:s  r_is_bound_methodrwsQ
r:t,$$T*<tt|==rc
i}tj|tjD]
\}}d||<|jD]}|j	t||j
D]}t||||<|SNrT)r
getmembersr`	__bases__update
allmethodskeysr)clmethodskeyvaluer<s     rr}r}sG((W->->?
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_listrsE
C	B
Q<JJqMIIaL	
7Nrc*|dvry|jdr|jdry|jdr
t|dry|tur.|tvr&tt
||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   rvisiblenamersHHtt!4QsY 7
*)>!>gc4.
0C0CD
s{??3'''rcg}tj|D]Q\}}}}tj|r d}t|tr|j
d}|j
||||fS|S)zCWrap inspect.classify_class_attrs, with fixup for data descriptors.data descriptorreadonly property)rclassify_class_attrsr2r.r/fsetr)rAresultsr#kindr"rs      rrr,sqG$+$@$@$H1 tS%##E*$D%*uzz/A*dC/01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)attrfield_orders r<lambda>z!sort_attributes.<locals>.<lambda>@sKOODGQ7aArrN)r	enumeraterWrGsort)attrsrAfieldsir#keyfuncrs      @rsort_attributesr7snVY
+F=Fv=NO	DtaFm+OBG	JJ7J	Ps!AAAAA'&A'ctjj|rIdD]D}tjjtjj	|d|zsDyy)z3Guess whether a path refers to a package directory.)z.pyz.pyc__init__TF)rr
risfilerX)r
exts  r	ispackagerEsM	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"""rj"""r\r)readlinerVr)filelinerPs   rsource_synopsisrMs==?D
r(c/}}Ur(c/::<DBQx6$qr(4BQx5ABx9T#2Yd**,==?D**,E"1%++-M&Mrcttj|j}|j|d\}}|||krY|j	ttjjrtjj}nO|j	ttjjrtjj}nd}|-	tj|}|5t|}dddn|d|}tj j#d||}	tj$j'|}	t(j*d=|	j,r|	j,j/dnd}||f||<|S#t$rYywxYw#1swY!xYw#YyxYw)z.Get the one-line summary out of a module file.NNN__temp__loaderr)rstatst_mtimerrtuple	importlib	machineryBYTECODE_SUFFIXESSourcelessFileLoaderEXTENSION_SUFFIXESExtensionFileLoadertokenizeopenOSErrorrutilspec_from_file_location
_bootstrap_loadr	rr@
splitlines)
filenamecachemtime
lastupdaterP
loader_clsrrspecmodules
          rsynopsisr^sGGH&&E8\:JZ%/U9#6#6#H#HIJ",,AAJ


uY%8%8%K%KL
M",,@@JJ
}}X.

/(.
/
/ 
H5F>>99*hAG:ID
"--33D9J'7=~~V^^..034F &/hM)


/
/
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__sp(E*h
66H~DH!DJ,,DG!
	
MM_,
.-5)DHdj$' 
rcl|jj}d|jd|d|jS)Nzproblem 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<Import a Python source file or compiled file given its path.rbNr)rrMAGIC_NUMBERrreadrWrr
basenamesplitext_bootstrap_externalrSourceFileLoaderrrrrr)
r
magicris_bytecoderr#rrrerrs
          r
importfilersNN''E	
dD	5TtyyU445ww%H  *ID#..CCD$O..??dK>>11$V1LD+##))$//55+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_modulerrrrCSyntaxErrorrr.ImportErrorr#)r
	forceloadrmsubsrrrs        r
safeimportrs/
,3333$';;Ka!,,tcz2JKK 6D=)C!$S!1E#JC()((.M)L
/3;;#CKK$5$>$>DD
#Y+
%#CLL#66
[
)chh$.>$D#..
/s68B(B#B#A	B(#B((	E1A?E5EEceZdZejjddejddzZd	dZ	d	dZ
e
xZxZ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.)rr_	docmoduler docclassr`
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|}tjjd|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.pydoc_mod)zhttp://zhttps://z
{}/{}.html/.htmlN)r
getabsfilerGrenvironrr	r
r
r.rCr)rrXformatrOlower)r:rAbasedirrdoclocs     r	getdoclocz
Doc.getdoclocs)	 %%f-Ddoo>''""7+vtBx(
__!99oog&//"'',,w"HIOO#BB  !89%,,V]]3-?AVAVAXY

ffoo.C.C.E.OP
F
'	 D	 sE""E10E1N)r)rrrr%rr	version_infor	rrrrr
rdocpropertyr	sysconfigget_pathr*rrrrrso G"%"2"22A"6!78J$ !LPOIOO:OO;(:	(:(:8(Drrc<eZdZdZdZdZdZdZdZeZ	dZ
eZy)	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&amp;<z&lt;>z&gt;)rhr:rfs  rescapezHTMLRepr.escapestS'3VDDrc.tj||Sr+)rrr:rAs  rrz
HTMLRepr.reprsyyv&&rc	Btt|drTddjt|jj	z}t||rt||||S|j
ttt||jSNr)repr_r)rrCrXr)rrrDrprtrr<r:rlevel
methodnames    rrepr1zHTMLRepr.repr1sy47J' 388DG,<,<,B,B,D#EEJtZ(0wtZ0E::{{4Q 0$--@AArct||j}t|}d|vr/dt|ddvr d|dz|j	|z|dzStjdd|j	|S)Nr\\rKrrz-((\\[\\abfnrtv\'"]|\\[0-9]..|\\x..|\\u....)+)z<span class="repr">\1</span>)rpr;rrhrDrMrNr:rrKtesttestreprs     rrepr_stringzHTMLRepr.repr_string%s}At~~&:4<D%(DD!$t{{4'888A;FFvvF5kk(+-	-rc		|jttt||jS#|jd|j
jzcYSxYwNz
<%s instance>)rDrprtrr;r+r)r:rrKs   r
repr_instancezHTMLRepr.repr_instance2sQ	G;;tGDG$4dnnEFF	G;;1E1EEFFs	69*A%N)r)rrr@rrDrrMrTrepr_strrXrepr_unicoderrrr1r1s4L-E'B	-HGLrr1ceZdZdZeZejZejZdZddZ			ddZ
dZdZdZ
d	Zd
ZdZdZd
ZdZdiiifdZddZddZddiifdZdZddiiidfdZddZeZddZddZy)HTMLDocz'Formatter class for HTML documentation.cd|d|dS)Format an HTML page.zN<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Python: z</title>
</head><body>
z
</body></html>r)r:titlecontentss   rpagezHTMLDoc.pageCsH&	&rcd|d|xsddS)zFormat a page heading.zU
<table class="heading">
<tr class="heading-text decor">
<td class="title">&nbsp;<br>z</td>
<td class="extra">&nbsp;z</td></tr></table>
    r)r:r_extrass   rheadingzHTMLDoc.headingOs&$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.z<span class="code">rcz</span>z-<p>
<table class="section">
<tr class="decor zD-decor heading-text">
<td class="section-title" colspan=3>&nbsp;<br>z</td></tr>
    z
<tr><td class="decor z-decor" rowspan=2>z</td>
<td class="decor z-decor" colspan=2>z</td></tr>
<tr><td></td>z-decor">z	</td><td>z.
<td class="singlecolumn">%s</td></tr></table>r)	r:r_r"r`widthprelude
marginaliagaprPs	         rsectionzHTMLDoc.sectionXs{.E1AAIMJ
	
:sGS::F
8;ZNNFIHTTTrc2d|z}|j|g|S)z$Format a section with a big heading.z&<strong class="bigsection">%s</strong>)rl)r:r_rs   r
bigsectionzHTMLDoc.bigsectionms"85@t||E)D))rcf|j|j}t|dddddddd	S)z!Format literal preformatted text.

z
 
rrcrS<br>
)rD
expandtabsrhrCs  r	preformatzHTMLDoc.preformatrs7{{4??,-tVWfg (D(<	<rcd}t|dzdz}tdD]F}|dz}t||z||z|zD]"}|t|ks||||zdz}$|dz}Hd|zS)z0Format a list of items into a multi-column list.rKrjrz<td class="multicolumn">rqrgz<table><tr>%s</tr></table>)rWrange)r:listr&rProwscolrs       rmulticolumnzHTMLDoc.multicolumnxsD	A
!#8	&C88F48T#Xd]3
As4y=#fT!Wo5@F
Ag%F	&,f44rcd|zS)Nz<span class="grey">%s</span>rrCs  rgreyzHTMLDoc.greys
!?$!FFrc8|D]}||vsd||d|dcS|S)z:Make a link for an identifier, given name-to-URL mappings.	<a href=""></a>r)r:r#dictsr5s    rnamelinkzHTMLDoc.namelinks0	BDt|04T
DAA	Brc	|jtjj|j}}t||r.t
|||ur d|jd|dt||dSt||S)zMake a link for a class.r}.html#r~r)r)r	rrrrrr])r:rAr\r#rs     r	classlinkzHTMLDoc.classlinkse8I8I(Jf64 WVT%:f%Dy'AC
C))rc<d|jd|jdS)zMake a link for a module.r}.html">r)r)rFs  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#z%s.htmlz"<strong>%s</strong>&nbsp;(package)r}r~r)r{)r:
modpkginfor#r
rshadowedurlrfs        r
modpkglinkzHTMLDoc.modpkglinksV*4'dIx99T?""&-Cd"C7$>DD(+T22rcd|d|dS)zMake a link to source file.z<a href="file:r~rr)r:rr
s   rfilelinkzHTMLDoc.filelinks
-0$77rc|xs|j}g}d}tjd}|j||x}	r|	j	\}
}|j||||
|	j
\}}
}}}}|
r1||jdd}|jd|d|dn|r-dt|z}|jd|d||dn|r-d	t|z}|jd|d||dn|rE|||d
zdk(r%|jd|j||zne|jd
|znP|||d
zdk(r$|j|j||||n!|j|j|||}|j||x}	r|j|||ddj|S)zMark up some plain text, given a context of symbols to look for.
        Each context dictionary maps object names to anchor names.rzJ\b((http|https|ftp)://\S+[\w/]|RFC[- ]?(\d+)|PEP[- ]?(\d+)|(self\.)?(\w+))"z&quot;r}r~rz(https://www.rfc-editor.org/rfc/rfc%d.txtz!https://peps.python.org/pep-%04d/rT(zself.zself.<strong>%s</strong>NrK)rDrMcompilesearchspanrgroupsrhintrrX)r:rfrDfuncsclassesrrherepatternmatchstartendrschemerfcpepselfdotr#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<dt class="heading-text">r, )z
</dt>z
<dd>
%s</dd>
z
<dl>
%s</dl>
)r.rrrrXrv
formattree)
r:treer\parentrPentrycbasesparentsr<s
          rrzHTMLDoc.formattrees
	'E%' 5"==$..G"<<Uvi/ G %Ft~~dG'DEF#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"}|dddk(r|ddd
k(r|ddj%}|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.NrrTr}z.html" class="white">rr!<strong class="title">%s</strong>rr$Revision: $z
version %srz (%s)rz-<br><a href="%(docloc)s">Module Reference</a>rKz<a href=".">index</a><br>rrz#-z<span class="code">%s</span>z
<p>%s</p>
rrzPackage Contentszpkg-contentc,j|dSry)r)tr:s rrz#HTMLDoc.docmodule.<locals>.<lambda><s4??1Q4#8rModulesClassesindexr	Functions	functionsDatadatarqrAuthorauthorrCreditscredits)6r)__all__r8rrurWrrXrr$urllibparsequoterrGrrDrrVrDrr*localsrerzr_r 	getmodulerr{rr	rrrr`r-r,rdrrQrspkgutiliter_modulesrrryrrnrgetclasstreerrr)#r:rAr#modignoredrpartslinksr
linkednameheadr
rrinfoversionr)rPrrcdictrrr<r\rrfdictrr=modpkgsimporterispkgr`	classlists#`                                  rrzHTMLDoc.docmodules	..C

3s5z!|$	3ALL%1+&a2
3	3XXeeBCj01
2Z?	$%%f-D,,$$T*C}}S$/H6=)&,,-Gs|11gbclc6I!"R...0KKt{{7';;<6:&KKC$89:'DIIdO33D'DvxOFFd$?($JV$ST$$VW-=-=>R!,,VW__E	:JC""5)3V>sC0NNC<003c	9E#Ju
	:"	PJC
P#}}dooW1d?v'&#2Fvs+t3"e|7>7IC7OOE#Jt

P	P2u!,,VW5F5FG	LJC!!%(G,=,=e,D,NsC0LL#u.!%E#J))%0s%,	L!,,VV<	*JC3V,S%L)	*kk&.$..%G:4s:-#--6:&G,3,@,@,Q
:('5ua89
:LLN''AHdoo"M8==F
''8:Hdoo=(44F3:;<C;I; 4 4Y BDIKH%
O
U

eS$u MN
Odoo7CHHX$688FH#
O
U

eS$u MN
Odoo[#((8*<>>FH"
;
U

eS 9:
;doo

h 799F6<({{3v'8'8#94>>JHdooh(KKF6=){{3v'9'9#:DNNKHdooiHMMF
]	C		$#H	$L<s*[A[*[&[[[#"[#c
 !"j}|xs|}j}g}	|	j!G!fdd}
|
tt	j
}t
|dkDrLj!d|D]'}!dj|jz)!d !fd}
!fd} !fd	}tDcgc]\}}}}t|
r||||f}}}}}i |D]*\}}}}dzdz|zx |<}	t|}	| |<,|r|r|j"n|d
d"t!|"fd\}}t"j$ur"t"j$ur|}V"urd}ndj"jz}|dz
}t'||
d|z|d}|
d|z|d}|
d|z|d}|d|z|d}|d|z|d}|d|z|d}|gk(sJ|}|rdj)|	}	|k(r
d|d |d!}nd"|d#|d$|d%}|rKg}|D]-}|jj|j/|d&d'j)|zz}d}	t	j*}|r)t/|}|r|d)k7r|j1|zd*z}t3}|r	||xsdz}j5|j6 }|xrd+|z}j9|d,|	d-|Scc}}}}w#t$rYwxYw#t$rYMwxYw#t,tf$rd(}YwxYw).z.Produce HTML documentation for a class object.ceZdZdZfdZy)(HTMLDoc.docclass.<locals>.HorizontalRulecd|_yrneedoner=s rrz1HTMLDoc.docclass.<locals>.HorizontalRule.__init__i	 rc<|jrdd|_y)Nz<hr>
rTrr:pushs rmaybez.HTMLDoc.docclass.<locals>.HorizontalRule.maybek<<N rNr)rrrrrsrHorizontalRulerh

!
!rrrUz&<dl><dt>Method resolution order:</dt>
z<dd>%s</dd>
</dl>
c&t||\}}|rV
j||D]9\}}}}	t
|}j||	
d;|S#t$rj||Y0wxYw)NrSrrrr	Exceptionr)msgrrokr#rhomeclsrrrhrmdictrrArr:s        rspillzHTMLDoc.docclass.<locals>.spill{s#E95IB
S	24
.D$H ' 5T]]5$(-wvGHJ
L%=T\\%s;<=sA++"BBct||\}}|r=j
||D] \}}}}
j||	"|Sr+rrrrrrrr#rrrrrrr:s        rspilldescriptorsz*HTMLDoc.docclass.<locals>.spilldescriptorsX#E95IB
S	249.D$eT3789Lrcdt||\}}|rj||D]\}}}}jt||}t	|}	|	sd|zn;jt	|j

}	d|	z}	d||	dd|S)Nz<dl><dt>%s</dl>
z <dd><span class="code">%s</span><dl><dt>rrS)rrrrrQrrs)rrrrr#rrrr<r=rrrrrrArr:s          r	spilldataz#HTMLDoc.docclass.<locals>.spilldatas#E95IB
S	24
.D$==)>cJD -C0478"kk&-*/%A@3FdC@AJ
Lrr9r-rc|duSNrUrr	thisclasss rrz"HTMLDoc.docclass.<locals>.<lambda>AaDI<Mrdefined hereinherited from %sz:<br>
z
Methods %sc|ddk(SNrTmethodrrs rrz"HTMLDoc.docclass.<locals>.<lambda>AaDH$4rzClass methods %sc|ddk(SNrTzclass methodrrs rrz"HTMLDoc.docclass.<locals>.<lambda>AaDN$:rzStatic methods %sc|ddk(SNrTz
static methodrrs rrz"HTMLDoc.docclass.<locals>.<lambda>AaDO$;rzReadonly properties %sc|ddk(SNrTrrrs rrz"HTMLDoc.docclass.<locals>.<lambda>qt7J/JrzData descriptors %sc|ddk(SNrTrrrs rrz"HTMLDoc.docclass.<locals>.<lambda>qt7H/HrzData and other attributes %sc|ddk(SNrTrrrs rrz"HTMLDoc.docclass.<locals>.<lambda>!rrK	<a name="z">class <strong>
</strong></a>z<strong>z</strong> = <a name="z">class r(%s)rN()rpz&<span class="code">%s<br>&nbsp;</span>r_rj)r)r{rrrgetmrorWrrrrrrrrGpopleftrbuiltinsrArrX	signature
ValueErrorrDrDrQrrsrl)#r:rAr#rrrrrealnamerr`rmror<rrrrr"rrrranchor	inheritedtagr_rdeclrargspecr=rrrrs#`` ```                         @@@@rrzHTMLDoc.docclass]s ??x  	!	!
GNN6*+s8a<HHJ:;
J_t~~d6<6G6G(IIJ
J
O		$			&0DF/K33+T4e&1c5)33).
	%Cw"%*s"2S"88E#J
-

 &e
	KKM	!!HQK	*52MNE9X__,hoo1M!f$$)DNN9;A;L;L-NN9CE6*,,e46E,s2E:<E-3U;=E$%=%CU%JLE$%:S%@%%HJE<sBE68EB;ECF778$8h E
dH&EG
Ht~~dF4E4EFG
HFTYYw%777E	))&1I)nG7d?dkk'22V;Vn#)$Ckk#t~~uguED>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.=)r{rrFs  rformatvaluezHTMLDoc.formatvaluesyytyy0011rc |j}|xs|}|xr|jxsddz|z}	d}
d}t|r}|jj}|r||urad|j	||z}
nK|j*d|j	|jj|z}
nd|j	||z}
tj|stj|rd}
nd}
||k(r
d	|	d
|d}nD|r5tj||g|urd|jdz|zd
|d}d}n|}d	|	d
|d|}d}tj|r2	tj|}|rt|}|dk(r
d|z}|dd}|sd}|
|z|j|z|
xr|jd|
zz}|rd|zS|j!t#||j$|||}|xrd|z}d|d|dS#ttf$rd}YwxYw)z;Produce HTML documentation for a function or method object.rKrr from N method of %s instance unbound %s methodasync rz
"><strong>rz
<a href="#r~rrTz</strong></a> = <lambda>z$<strong>%s</strong> <em>lambda</em> r(...)z$<span class="heading-text">%s</span>z<dl><dt>%s</dt></dl>
z%<dd><span class="code">%s</span></dd>rz</dt>r)r)rwr*r+rriscoroutinefunctionisasyncgenfunctiongetattr_staticr`rrrGrDrDr{rrQrs)r:rAr#rrrrrrr noteskipdocsimclassasyncqualifierr_reallinkr$rr#r=s                    rr
zHTMLDoc.docroutines<??x$*c1D8F#oo//G"$#dnnWc&BBD??.3dnn113788D0$..2MMD''/**62%NN8>DhOEg,,R2>&HKK#%0(<#h(EV$
!#--f5	i.z)BTIE&amGG%G(<<AHyy?$FGI+d22++vwICGACGC15s;;-	*
! 	
!sG99H
H
cg}|j}|r|d|z|jt||j}|r|d|z|ddj	|S)z1Produce html documentation for a data descriptor.z!<dl><dt><strong>%s</strong></dt>
z&<dd><span class="code">%s</span></dd>
rrK)rrrQrsrXr:rAr#rrrrr=s        rrzHTMLDoc.docdataDs`~~5<=kk&.$..9:S@AYwwwrcD|xrd|zxsd}||j|zS)z-Produce HTML documentation for a data object.z<strong>%s</strong> = rKr)r:rAr#rrlhss      rrzHTMLDoc.docotherTs+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	<genexpr>z HTMLDoc.index.<locals>.<genexpr>^s!@RFc"g///@s#%rKrTr)rranyrrryrrn)r:rrrrr#rr`s        rrz
HTMLDoc.indexYsX%,%9%93%%@	!HdE@4@@NND"eTX-=>?HTN		##GT__=sGX66rrK)rKNrcr+rNNN)r)rrr@r1_repr_instancerrDrarerlrnrsryr{rrrrrrrrrr(r
rr-rrrrrr\r\:s1ZND

"
"F
&&3419U**
<
5G*O
38#'b"b% R*&sj%)d"b`>D2'+R?<B K'

7rr\c,eZdZdZdZdZdZeZdZy)TextReprzAClass for safely making a text representation of a Python object.cttj|dx|_|_d|_dx|_|_yr3r7r=s rrzTextRepr.__init__lr>rc$tt|drTddjt|jj	z}t||rt||||St
tt||jSrH)
rrCrXr)rrrprtrr<rJs    rrMzTextRepr.repr1rsp47J' 388DG,<,<,B,B,D#EEJtZ(0wtZ0E::GDG$dmm44rct||j}t|}d|vr dt|ddvrd|dz|z|dzS|S)NrrOrKrPr)rpr;rrhrQs     rrTzTextRepr.repr_stringysVAt~~&:4<D%(DD!$t+hqk99rc	ttt||jS#d|jj
zcYSxYwrV)rprtrr;r+r)rWs   rrXzTextRepr.repr_instances=	:Q($..99	:"Q[[%9%999s	'*AN)	r)rrr@rrMrTrYrXrrrrJrJjs K-5H:rrJceZdZdZeZejZdZd
dZdZ	ddZ
ddZddZd	Z
dd
ZddZeZddZy)TextDocz'Formatter class for text documentation.c2djd|DS)z(Format a string in bold by overstriking.rKc3,K|]}|dz|zyw)Nrr@s  rrCzTextDoc.bold.<locals>.<genexpr>s5"rDy2~5s)rXrCs  rboldzTextDoc.boldsww5555rc|sy|jdDcgc]}||zj}}dj|Scc}w)z6Indent text by prepending a given prefix to each line.rKrS)rrOrX)r:rfprefixrrYs     rindentzTextDoc.indentsEB6:jj6FGd&4-'')GGyyHsAct|j|j}|j|dz|zdzS)z&Format a section with a given heading.rSrp)rWrOrT)r:r_r`clean_contentss    rrlzTextDoc.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|ywr+r])rArr\s  rrCz%TextDoc.formattree.<locals>.<genexpr>sDyG4DsrrrS    )r.rr]rXrvr)
r:rr\rrVrPrrrrs
  `       rrzTextDoc.formattrees
	8E%' 5&9Q+@@Uvi/DeDG#ftyy/A&AAF$E4($//7Av#88
	8
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
dj-|z}g}t
j|tj.D]:\}
}|jj1|dzs%|
|vs*|j|
<|r4|j+||jd
dj-|z}|	r|	D
cgc]\}
}|	}}
}|j3t
j4|d|g}|	D]'\}
}|j|j7||
|)||jddj-|z}|rRg}|D]'\}
}|j|j7||
|)||jddj-|z}|
rTg}|
D])\}
}|j|j9||
|d+||jddj-|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)rmDATArrrrrVERSIONrDATErAUTHORrCREDITSrFILE)%r)rZrQrlrr*rrzr rrrr`r-rdsetrrrraddrrXr_rrrrrrDrrVrrrr$rG)r:rAr#rsynopdescrPrr)rrrrrr
modpkgs_namesrr\r
submodulesrr`rrs                        rrzTextDoc.docmodules5vf~.tfde.E
&FGfi.'dll+=vI@Fdll=$??F!,,VW__E	1JC%%e,66AsC0NNC<0	1!,,VW5F5FG	/JC!!%(G,=,=e,D,NsC0LL#u.	/!,,VV<	*JC3V,S%L)	*
6:&,3,@,@,Q
,('5!!'*NN7\#9:NN7+
,
LLNdll"DIIg$688F
!,,VW5E5EF	'JC~~((4M9Q!!#&	'OOdlldii
355F189:39I9$$Y2D:;H%
A
U

eS$ ?@
Adll9dii6IJJFH#
A
U

eS$ ?@
Adll;		(8KLLFH"
L
U

eS$r
 JK
Ldll6499X3FGGF6=)&,,-Gs|11gbclc6I!"R...0dll9g>>F6:&dll63v3GHHF6<(dll8S9J9J5KLLF6=)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||Sr+r\)rrs  rmakenamez"TextDoc.docclass.<locals>.makenamesQ?"rclass z	 = class rrNrrSrUzMethod resolution order:r]rKc3K|]C}|jjds&|jdk(rt|jEyw)rrN)r)rrrD)rAr"s  rrCz#TextDoc.docclass.<locals>.<genexpr>Cs?
S3LL++C0S^^z5Q

SsA	ArrzBuilt-in subclasses:z    ... and z other subclassesceZdZdZfdZy)(TextDoc.docclass.<locals>.HorizontalRulecd|_yrrr=s rrz1TextDoc.docclass.<locals>.HorizontalRule.__init__Urrc<|jrdd|_y)NzF----------------------------------------------------------------------rTrrs rrz.TextDoc.docclass.<locals>.HorizontalRule.maybeWrrNrrsrrrxTrrrc	t||\}}|rKj||D].\}}}}	t
|}j||	
0|S#t$rj||	YWwxYwr+r)
rrrrr#rrrrrrArr:s
        rrzTextDoc.docclass.<locals>.spill]s#E95IB
S	24	<.D$< ' 5T]]5(,c6;<	<L%=T\\%s;<=sA  "BBct||\}}|r=j
||D] \}}}}
j||	"|Sr+rrs        rrz*TextDoc.docclass.<locals>.spilldescriptorsnrrc
t||\}}|r[
j
||D]>\}}}}t|}	t|}	
j
|	|d|dz@|S#t$r|j
|}	Y=wxYw)Nre)rmr=rS)rrrQrr8__dict__r)rrrrr#rrrr=r9rrrArr:s          rrz#TextDoc.docclass.<locals>.spilldataws#E95IB
S	24.D$ -C5%fd3sD#bcJ
L	*5%..t45sA00B
Brrc|duSrrrs rrz"TextDoc.docclass.<locals>.<lambda>rrrrzMethods %s:
c|ddk(Srrrs rrz"TextDoc.docclass.<locals>.<lambda>rrzClass methods %s:
c|ddk(Srrrs rrz"TextDoc.docclass.<locals>.<lambda>rrzStatic methods %s:
c|ddk(Sr
rrs rrz"TextDoc.docclass.<locals>.<lambda>rrzReadonly properties %s:
c|ddk(Sr
rrs rrz"TextDoc.docclass.<locals>.<lambda>rrzData descriptors %s:
c|ddk(Srrrs rrz"TextDoc.docclass.<locals>.<lambda>rrzData and other attributes %s:
c|ddk(Srrrs rrz"TextDoc.docclass.<locals>.<lambda>rrz |  )r)r{rrTmaprXrrrrrGrDrQrrrWsortedrC__subclasses__r'rrrrrrAr]rrWrO)!r:rAr#rrrrrtr_rr`rr$r=rr<
subclassesno_of_subclassesMAX_SUBCLASSES_TO_DISPLAYsubclassnamerrrrrr"rrr!r"rrrs!`` `                          @@@rrzTextDoc.docclasss??x   ++	#8tyy22EIIdOk1H<E(E*GFTYYw%777E	))&1I)nG7d?TG^d*+VntGNN6*+s8a<+,
.Vhtn,-
.H
S$*=*=f*E
S		


z?$%!'( *+E,E F
,Vl*+
,";;^),EEFG()*
H	!	!
		"	
	
	 0DF/K33+T4e&1c5)33KKM	!!HQK	*52MNE9X__,hoo1M!f$$)Ii6<6G6G-II
E6*/C/46E/#5u:<E036;=E$%@3%F%JLE$%=%CU%HJE?#Eu68EB;ECF99X&4<t|dkk(//*;VDDtKKEI&	I	p3sMM 
MMc*d|j|zSr&r;rFs  rr(zTextDoc.formatvaluesTYYv&&&rc|j}|xs|}d}d}t|rk|jj}|r||urOdt	||z}n?|j$dt	|jj|z}ndt	||z}tj|stj|rd}	nd}	||k(r|j|}
n4|rtj||g|urd}|j|d	z|z}
d}tj|rA	tj|}|r)t|}|d
k(r|j|dz}
|dd}|sd
}|	|
z|z|z}
|r|
dzSt|xsd}|
dz|xr"|j!|j#dzzS#ttf$rd}YwxYw)z;Produce text documentation for a function or method object.rKrr*Nr+r,r-rT = r.z lambda rr/rS)r)rwr*r+r]rr0r1rTr2r`rrrGrDrQrWrO)r:rAr#rrrr3r4r5r6r_r$rr#r=s               rr
zTextDoc.docroutines??xF#oo//G"$#i&==D??.3i113788D0)GC2HHD''/**62%NN8IIh'Eg,,R2>&HIIdOe+h6EV$
!#--f5	i.z) IIdOj8E&amGG%/$6$;.&BC$;#"J$++c*:*A*A*Cd*JKK%	*
! 	
!sF00GGcg}|j}|r||j||dt|xsd}|r||j||ddj	|S)z1Produce text documentation for a data descriptor.rSrK)rrTrQrWrXr9s        rrzTextDoc.docdatasb~~4!JVn"S!"Jwwwrc$|j|}|r+|xr|dzxsd|z}|t|z
}	|	dkr|d|	dz}|xr|j|dzxsd|z}|st|}|r#|d|j	t|zdzz
}|S)z-Produce text documentation for a data object.rrKrNrkrS)rrWrTrQrWrD)
r:rAr#rrrmr=rrchops
          rrzTextDoc.docothersyy )TE\/R47DCI%DaxUde 304506B$>.CD4;;s3x00477Dr)r])NrKrrG)NNNNN)r)rrr@rJrHrrTrWrlrrrr(r
rr-rrrrrPrPsZ1ZND6 A cJXLt'5Ln KrrPceZdZdZdZy)
_PlainTextDocz2Subclass of TextDoc which overrides string stylingc|Sr+rrCs  rrTz_PlainTextDoc.bold
srN)r)rrr@rTrrrrrs
<rrc.tat|y)zCThe first time this is called, determine what kind of pager to use.N)getpagerpagerrss rrrs
JE	$Krc^ttjdstSttjdstStjjrtjjstStjdk(rtStjjdxstjjdrCtjdk(rfdStjjddvrfd	Sfd
StjjddvrtStjdk(rdSttd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|Sr+
tempfilepagerplainrf	use_pagers rrzgetpager.<locals>.<lambda>%s
eDk9 ErTERM)dumbemacsc.tt|Sr+)	pipepagerrrs rrzgetpager.<locals>.<lambda>'s	%+y Arct|Sr+rrs rrzgetpager.<locals>.<lambda>)s	$	 :rc,tt|dS)Nzmore <rrss rrzgetpager.<locals>.<lambda>-sM%+x@rsystemz(less) 2>/dev/nullrct|dS)Nlessrrss rrzgetpager.<locals>.<lambda>/s
IdF3rNz	more "%s"ct|dS)Nmorerrss rrzgetpager.<locals>.<lambda>6s
	$ 7r)rr	stdin
plainpagerstdoutrplatformrr%rrtempfilemkstempcloseunlinkttypager)rfdrrs   @rrrs399h'3::x(99SZZ%6%6%8
|||#

z*EbjjnnW.EI<<7"EE
ZZ^^F
#'8
8AA::	zz~~f!22
||w@@r8+?!@A!E33%%'NRHHRL2x RYY{X/E%F!%K7			(
		(		(s7-H:HH,c0tjdd|S)z%Remove boldface formatting from text.z.rK)rMrNrss rrr<s
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)rfcmdrprocpipes     rrr@sCt:??#57D	

ZZ	4


4 		IIK%

		

!	
		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<Page through text by invoking a program on a temporary file.rNz	pydoc.outwrr)rencodingz "r)rTemporaryDirectoryrr
rXrr	rdevice_encodingrr)rfrrtempdirrrs      rrrXs		$	$	&/'77<<5
(C(:,,')--a0/3	JJt		
			#*x'#-.//		//s$AB:-B.?&B:.B7	3B::Ccttjddxsd}|j|dj	|S)Nrutf-8r)rr	rencodedecode)rfrs  r_escape_stdoutrds6szz:t4?H;;x!34;;HEErc	tt|jd}	ddl}tj
j
}|j|}|j|d}		ttjj!dd}|dkrd}|dz
x}}tj$j'dj)|d|dz||drtj$j'd	tj$j+|}	|	d
vr tj$j'dn|	dvr.tj$j'd||zdz|dz}|	d
vr||z
|z
}|dkrd}tj$j'ddj)||||zzdz||z}||dr|r|j-|j.yy#tttjf$r	d}d}YwxYw#t"$rd}YwxYw#|r|j-|j.wwxYw)z%Page through text on a text terminal.rSrNc@tjjdSry)r	rrrrrrzttypager.<locals>.<lambda>qs#))..+rcJtjjddddS)NrrT)r	rrrrrrzttypager.<locals>.<lambda>ts!#)),,.s3BQ7rLINESrTz
-- more --)qQz
          
)
rS)bB)rrrttyr	rfileno	tcgetattr	setcbreakrr8ioUnsupportedOperationrrr%rrrrrXflush	tcsetattr	TCSAFLUSH)
rfrYrroldgetcharhrPincrs
          rrris.&'--d3E8
YY


mmB

b+
2	BJJNN7A./A
6Aa%C

5#;/$67ABiJJ\*JJ	AJ

  !12l"

  !1E!H!<t!CDE&&GcMq5a!JJTDIIeAaen$==DECA!ABi&MM"cmmS1A
)@)@A878	A	2MM"cmmS1s=AG1.)HD8H-1#HHH*&H-)H**H--"Icftjjtt	|y)z>Simply print unformatted text.  This is the ultimate fallback.N)r	rrrrrss 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 ruz	function zmethod )rr_r)r	rrr-isgetsetdescriptorr3rr4r r,r(rC)things rdescribersW>>S555%665*%..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)rrWrrXrrr8)r
rpartrrn
nextmodulerAs        rlocaters"jjo6dT6E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)rrrAr#s    rresolverso%y)>,/445
5u}uj$/js3d====rc(|t}t||\}}t|}tj|}|rd|vr|d|d|jdzz
}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 objectrp)rfrrrrrfindr)r_r r`r2rIrrrCr)rr_rrendererrAr#rors        r
render_docrs5),LFDFD


v
&Ft.tzz#///	F&(
//V$oof%'&&v.fo6<(&&F&\FID4<& 8#4#4VT#BBBrc
|	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)rr_routputis_clirrs       rr=r=s|~	*UE956	5%I>A	Q	#JJ		CA	s.AA$	A!	AA!$	B-A==Bct||\}}tjt|tj	||}t|dzdd5}|j
|dddtd|dzy#1swYxYw)z<Write HTML documentation to a file in the current directory.r#rr)rNwrote)rhtmlrarrrrr)rrrAr#rars      rwritedocrss5),LFD99Xf%t}}VT'BCD	
dWncG	4

4	'4'>"s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	writedocsrs;|BT$+$9$93%$I '5
rcTeZdZiddddddddddd	d
ddd
dddddddddddddddddddid d!d"d#d$d%dd&d#d'd(d)d*d+d,d-d.d/d0dd1dd2d3d4d5d6d7dd8d9d:dd;d<d=iZd>Dcgc]}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)rrKasync)rrKawait)rrKbreak)r	while forclass)rzCLASSES SPECIALMETHODScontinue)rrdef)functionrKdel)rBASICMETHODSelififelse)r"rexcepttryfinallyfor)r&zbreak continue whilefromimportglobal)r)znonlocal NAMESPACES)r!
TRUTHVALUE)r(MODULESin)r,SEQUENCEMETHODSis
COMPARISONlambda)r0rdnonlocal)r1zglobal NAMESPACESnotorpass)r4rKraise)r5
EXCEPTIONSreturn)r7rd)r$r6while)r8zbreak continue if TRUTHVALUE)rz CONTEXTMANAGERS EXCEPTIONS yieldyield)r9rK)rfrPu'rr=z'''rr)+r***r"z//%<<>>r@|^~rArB<=>===!=<>)rArBrGrHrIrJrK)rrF)z+=z-=z*=z/=z%=z&=z|=z^=z<<=z>>=z**=z//=)rBrCr@rDrErF)jJ)STRINGS	OPERATORSr/UNARYAUGMENTEDASSIGNMENTBITWISECOMPLEXzOPERATORS FORMATTINGPOWERzTUPLES LISTS FUNCTIONSz ATTRIBUTES FLOAT MODULES OBJECTSELLIPSISzSLICINGS DICTIONARYLITERALSz	def classrNPRIVATENAMESzPRIVATENAMES SPECIALMETHODS
BACKQUOTESzTUPLES FUNCTIONS CALLSzLISTS SUBSCRIPTS SLICINGS)rAr@,rrk:@rrr`rr[]rTYPES)typeszRSTRINGS UNICODE NUMBERS SEQUENCES MAPPINGS FUNCTIONS CLASSES MODULES FILES inspect)stringsz4str UNICODE SEQUENCES STRINGMETHODS FORMATTING TYPES
STRINGMETHODS)zstring-methodszSTRINGS FORMATTING
FORMATTING)
formatstringsrOUNICODE)r`z:encodings unicode SEQUENCES STRINGMETHODS FORMATTING TYPESNUMBERS)numberszINTEGER FLOAT COMPLEX TYPESINTEGER)integersz	int rangeFLOAT)floatingz
float mathrS)	imaginaryz
complex cmath	SEQUENCES)typesseqz$STRINGMETHODS FORMATTING range LISTSMAPPINGSDICTIONARIESrd)typesfunctionsz	def TYPESMETHODS)typesmethodszclass def CLASSES TYPESCODEOBJECTS)zbltin-code-objectszcompile FUNCTIONS TYPESTYPEOBJECTS)zbltin-type-objectsztypes TYPESFRAMEOBJECTS
TRACEBACKSNONE)zbltin-null-objectrK)zbltin-ellipsis-objectSLICINGSSPECIALATTRIBUTES)specialattrsrKrc)r_z!class SPECIALMETHODS PRIVATENAMESr+)typesmodulesr(PACKAGESEXPRESSIONS)zoperator-summaryzlambda or and not in is BOOLEAN COMPARISON BITWISE SHIFTING BINARY FORMATTING POWER UNARY ATTRIBUTES SUBSCRIPTS SLICINGS CALLS TUPLES LISTS DICTIONARIESrO
PRECEDENCEOBJECTS)objectsr^SPECIALMETHODS)specialnameszbBASICMETHODS ATTRIBUTEMETHODS CALLABLEMETHODS SEQUENCEMETHODS MAPPINGMETHODS NUMBERMETHODS CLASSESr)
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-featuresrKSCOPINGFRAMESr6)rztry except finally raiseCONVERSIONS)conversionsrKIDENTIFIERS)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-rx)slicingsr-CALLS)callsr})powerr}rP)unaryr}BINARY)binaryr}SHIFTING)shiftingr}rR)bitwiser})comparisonszEXPRESSIONS BASICMETHODS)booleanszEXPRESSIONS TRUTHVALUE	ASSERTION
ASSIGNMENT)
assignmentrQrQ)	augassignrDELETION	RETURNING	IMPORTING)compoundzfor while break continue)truthz if while and or not BASICMETHODS)debuggerpdb)zcontext-managersr)CONDITIONALLOOPINGr*	DEBUGGINGCONTEXTMANAGERSNc ||_||_yr+)_input_output)r:inputrs   rrzHelper.__init__src>|jxstjSr+)rr	rr=s rrzHelper.inputs{{'cii'rc>|jxstjSr+)rr	rr=s rrz
Helper.outputs||)szz)rctjdddk(r|yd|jjd|jjdS)NrTrj?rKrArz
 instance>)rstackr+rrr=s r__repr__zHelper.__repr__sO==?1a 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> rUrrr<rT)rquitr)
rrgetlinerEOFErrorrVrWr'rr)r:rs  rrzHelper.interacts$
,,x0wmmoGGq WQZ72;%L*%L
'!B-7!!B-}}-/& 

		'"#&x0

sB..C?Cc|jtjurt|S|jj	||jj|jj
S)z.Read one line, using input() when appropriate.)rr	rrrrr)r:prompts  rrzHelper.getlinesQ::"= KKf%KK::&&((rcXt|trM|j}|dk(r|jnW|dk(r|j	n@|dk(r|jn)|dk(r|j
n|dddk(r#|j
|jdn||jvr|j|n|dvrtt|d	|
n||jvr|j|n||jvr|j|nk|rt|d	|j|nOttd	|j|n1t|t r|nt|d	|j||j"j%dy)
Nkeywordssymbolstopicsrzmodules rT)rrrzHelp on %s:r)rrrS)r.rDrVlistkeywordslistsymbols
listtopicslistmodulesrr
showsymbolr=evalr	showtopicrrr
rr)r:rrs   rrzHelper.helps?gs#mmoG*$d&7&7&9I%t'7'7'9H$doo&7I%t'7'7'9!
*  !34DLL($//'*B55DM=@DMM)4>>'+BDKK')@#g}T\\RXYc=fM

($&'=fM$rc|jjdjdtjddzy)Na
Welcome to Python {0}'s help utility!

If this is your first time using Python, you should definitely check out
the tutorial on the internet 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 quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, symbols, or topics, type
"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", type "modules spam".
z%d.%drU)rrr&r	r,r=s rrzHelper.intros7F7S%%bq))*	,rctt|}||z}t||zdz
|z}t|D]}t|D]s}||z|z}|t|ks|jj||||dz
ksA|jjdd|dz
t||z
zzu|jjdy)NrTrrS)rvrrWrurr)	r:itemscolumnsrhcolwrwrowrxrs	         rrvzHelper.list.sVE]#E
W$q(W4;	$CW~
R$J$s5z>KK%%eAh/Wq[())#tax#eAh-7O0P*PQ
R
KKd#	$rc|jjd|j|jj	y)NzN
Here is a list of the Python keywords.  Enter any keyword to get more help.

)rrrvrr~r=s rrzHelper.listkeywords;s4		
		$--$$&'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.

)rrrvrr~r=s rrzHelper.listsymbolsBs4	
	
		$,,##%&rc|jjd|j|jj	y)NzN
Here is a list of available topics.  Enter any topic name to get more help.

)rrrvrr~r=s rrzHelper.listtopicsJs4		
		$++""$%rc	ddl}|jj||jj|}|s(|jjdt|zyt|tr|j||S|\}}	|jj|}|jdz}|r|xsddz|z}|rRddl
}ddj|jzdz}	|j!|	d	}
|d
dj|
zz
}t#|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.rDrKeyErrorrVtextwraprXrwrapr)r:topic
more_xrefs
pydoc_datatargetlabelxrefsr=rrfwrapped_texts           rrzHelper.showtopicQsg	$

(9(9%(@AKK?$u+MNfc">>&*55u	##**51CiikD [bC'*4E*TYYu{{}-EELD#==r2L8dii555C
c
7	KK

	 	KK?$u+MN	s#D'
E'$E
E0FFcR	ddl}|jj||jj|}|stdt
|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)	rrrrrrr.rD	_gettopic)r:rrrrrrr=s        rrzHelper._gettopicqs	
$

(9(9%(@A344fc">>&*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__rarrrT)find)r
r\rors    rcallbackz$Helper.listmodules.<locals>.callbacksBwrs|{:%crl\9G<<$q('(GG$)rcd|dyr+r)r\rs ronerrorz#Helper.listmodules.<locals>.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
ModuleScannerrunrvr~)r:rrrrs    @rrzHelper.listmodulessKKF3K	


CLKK
G6=
)

.O':IIglln%KK
rr)F)rPrE)!r)rrr_strprefixes_symbols_inverserrrsymbols_rrrrr/rrrrArrrrrrrvrrrrrrr)rAprs000rr
r
sp$$$	$	y	$
	
f$	.
$	$	$	'$	4$	-$	$	&$	$	%$ 	%!$"	5#$$	.%$&	'$(	3)$*	
"+$,	'-$.	
'/$0	
l1$2	)3$4	55$6	y7$8	
i9$:	;$<	(=$>	)?$@	$A$B	:C$D	<E$F	G$HN$8LLaLAAELELL%e;l;N?!B4
$
%
/
*

+

%
%
(
(G",113%x	%F[[/FF"#-$GFO		%%	xU=U	(U
	AU	4
U	(U	=U	,U	+U	1U	IU	NU	4U 	>!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`	<aUb	,cUd	@eUf	*gUh	EiUj	0kUl	0mUn	8oUr	+sUt	9uUv	5wUx	3yUz	>{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- #*) *,"$('&@6%
O
Ms9H#r
ceZdZdZddZy)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|dd}|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_specrrrrrrrStringIOrrrrrrr)r:rr	completerrseenr\r#rorrrrsourcer
rs                rrzModuleScanner.runsCciik	//
	6G*$ !W
;T7B/%g.66<"D::d+A.D"U?T1Dzz|((-2 w5
	6)0(=(=g(N$	2$Hguyy{w+#--g6D6<0!!'!2!27!;
+2;;v+>?E2Dv~6%227;#!!*!5!5!;!;D!A
>D^^6>>446q9QSD"6*T:D-::<$$S)Q.T7D1I$	2LK;#%!"#G, !'!"#G, !s6&HH%H*	H
H
H'&H'*IIrG)r)rrr@rrrrrrs
A8rrcd}d}tj5tjdtj	|||dddy#1swYyxYw)zAPrint all the one-line module summaries that contain a substring.cJ|dddk(r|dddz}t||xrd|zyNrrraz- )r)r
r\ros   rrzapropos.<locals>.callbacks323<;&crl\1G
gt+t,rcyr+rr\s rrzapropos.<locals>.onerrorsrignorerN)rcatch_warningsfilterwarningsrr)rrrs   rrrsR-
		 	 	"<)Hc7;<<<s2AAc	
ddlddlddl	ddl
Gddjj
G	fddjjG
fdd
j}||||}|j|js:|js.tjd	|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.<locals>.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_responsesend_headerend_headerswfiler
urlhandlerr)r:content_types  rdo_GETz(_start_server.<locals>.DocHandler.do_GET9	syy!!&))*s#^-@<-OPJJT__		<))/
:rcyr+r)r:rs  rlog_messagez-_start_server.<locals>.DocHandler.log_messageI	srN)r)rrr-r/rrr
DocHandlerr"7	s	: 	rr0c$eZdZdZfdZdZy) _start_server.<locals>.DocServerc||_|j|f|_||_|jj	||j|j
d|_yNF)hostaddressrr<rhandlerr)r:r5portrs    rrz)_start_server.<locals>.DocServer.__init__O	sEDI IIt,DL$DMIItT\\4<<@DIrc|jsPj|jjgggd\}}}|r|j	|jsP|jyry)rselectsocketrhandle_requestserver_close)r:rdwrexr:s    rserve_until_quitz1_start_server.<locals>.DocServer.serve_until_quitV	sZii#]]DKK,>,>,@+A2r1M
B'')ii
rcv|jj||jr|j|yyr+)r<server_activaterr=s rrCz0_start_server.<locals>.DocServer.server_activate]	s,II%%d+}}

d#rN)r)rrrrArC)r:sr	DocServerr2M	s		 	$rrDc4eZdZfdZfdZdZdZy)#_start_server.<locals>.ServerThreadc||_||_t||_jj|d|_d|_yr4)r+r5rr8Threadrservingerror)r:r+r5r8	threadings    rrz,_start_server.<locals>.ServerThread.__init__d	s>(DODID	DI%%d+ DLDJrcn	jj__jj
_t|j_|j|j|j}||_|jy#t$r}||_Yd}~yd}~wwxYw)zStart the server.N)server
HTTPServerr<r7rMessageMessageClassstaticmethodr+r5r8ready	docserverrArrJ)r:docsvrrr0rDemailhttps   rrz'_start_server.<locals>.ServerThread.runl	s	
!!%!7!7	$.	!*/--*?*?
'(4T__(E
%"499diiD!''')
! 


!sBB	B4#B//B4cd|_|j|_|j|_d|j|jfz|_y)NTz
http://%s:%d/)rIr5server_portr8r)r:rMs  rrRz)_start_server.<locals>.ServerThread.readyy	s:DLDI**DI&$))TYY)??DHrcpd|j_|jd|_d|_d|_y)z&Stop the server and this thread nicelyTNF)rSrrXrIrr=s rstopz(_start_server.<locals>.ServerThread.stop	s."&DNNIIK"DN DLDHrN)r)rrrrrRrZ)r0rDrUrVrKsrServerThreadrFb	s		!	@	rr[g{Gz?)
http.server
email.messager:rKrMBaseHTTPRequestHandlerrNrHrrJrItimesleep)r+hostnamer8r[threadr0rDrUrVr:rKs     @@@@@@r
_start_serverrcspT[[77,$DKK**$*%%y''%N*h
5F
LLNll6>>

3ll6>>Mrc^	

Gfddt}|fdfd
fd
fdfdfdfd		fd
	

fd}|jdr|d
d}|dk(rtjj	tjjt}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.<locals>._HTMLDocc	:d}d|z}d|d|dd|d	S)r^zpydoc_data/_pydoc.cssz1<link rel="stylesheet" type="text/css" href="%s">zH<!DOCTYPE>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Pydoc: z	</title>
z
</head><body>z*<div style="clear:both;padding-top:.5em;">z</div>
</body></html>r)r:r_r`css_pathcss_linkhtml_navbars     rraz#_url_handler.<locals>._HTMLDoc.page	s/.HC
HkmX?
?rN)r)rrra)rjsr_HTMLDocrf	s
	?rrkcjtjdtjddtjd}d|djtjdd	S)
Nz [rrr]z=
            <div style='float:left'>
                Python <br>T)tersea
            </div>
            <div style='float:right'>
                <div style='text-align:center'>
                  <a href="index.html">Module Index</a>
                  : <a href="topics.html">Topics</a>
                  : <a href="keywords.html">Keywords</a>
                </div>
                <div>
                    <form action="get" style='display:inline;'>
                      <input type=text name=key size=15>
                      <input type=submit value="Get">
                    </form>&nbsp;
                    <form action="search" style='display:inline;'>
                      <input type=text name=key size=15>
                      <input type=submit value="Search">
                    </form>
                </div>
            </div>
            )rDrpython_versionpython_buildpython_compiler)rrs rrjz!_url_handler.<locals>.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|dSNr}rrrr#s r	bltinlinkz3_url_handler.<locals>.html_index.<locals>.bltinlink	
15t<<rz/<strong class="title">Index of Modules</strong>rz<p>zBuilt-in Modulesrzf<p align=right class="heading-text grey"><strong>pydoc</strong> by Ka-Ping Yee&lt;ping@lfw.org&gt;</p>zIndex of ModulesrK)	rer	rryrnr
rrrX)rvrer#namesr`rrrs       r
html_indexz _url_handler.<locals>.html_index	s	=,,=
#&":":($J&((##E95UT__&33488	3COODJJsD12	3	
'	("2778#444(sB>c	g		fd}tj5tjdd}tj	|||dddd}g}
jd}	D]\}}|j
|||z!|
jd|zd	d
j|z}d|fS#1swYoxYw)zSearch results page.cZ|dddk(r|dddz}j||xrd|zfyrr)r
r\ro
search_results   rrz3_url_handler.<locals>.html_search.<locals>.callback	s=rs|{*!#2,5  '4+?D4K!@Arrcyr+rrs rrz2_url_handler.<locals>.html_search.<locals>.onerror	srrNcd|d|dSrtrrus rrvz4_url_handler.<locals>.html_search.<locals>.bltinlink	rwrz-<strong class="title">Search Results</strong>zkey = %srrmzSearch Results)	rrrrrrerrnrX)rrrrvrrer#ror`r|rs         @rhtml_searchz!_url_handler.<locals>.html_search	s
	B

$
$
&	@##H-
O#w?		@	=,,;
(	3JD$NN9T?T12	3T__gv{{7';==))%	@	@s5CC
cd}jd}ttjj	}j||}|j
dd|z}d|fS)zIndex of topic texts available.cd|d|dSNz<a href="topic?key=r~rrrus rrvz4_url_handler.<locals>.html_topics.<locals>.bltinlink

6:DAAr$<strong class="title">INDEX</strong>Topicsr)rerr
rr~ryrn)rvrerxr`rs    rhtml_topicsz!_url_handler.<locals>.html_topics
sn	B,,2
v}}))+,##E95T__gx))!!rcjd}ttjj	}d}j||}|j
dd|z}d|fS)zIndex of keywords.rcd|d|dSrrrus rrvz6_url_handler.<locals>.html_keywords.<locals>.bltinlink
rrKeywordsr)rerr
rr~ryrn)rerxrvr`rs    r
html_keywordsz#_url_handler.<locals>.html_keywords
sn,,2
v++-.	B##E95T__++8##rctj}t||}|j|\}}||jvrd}nd}jd|z}dj
|z}j|d|}|rAt|j}d}j||}jdd|}|d|d	j|||ffS)
zTopic or keyword help page.KEYWORDTOPICrz
<pre>%s</pre>rcd|d|dSrrrus rrvz7_url_handler.<locals>.html_topicpage.<locals>.bltinlink0
s
:>EErrrrK)
rrr
rrrerrnrrryrlrX)	rbufhtmlhelpr`rr_rervrs	        rhtml_topicpagez$_url_handler.<locals>.html_topicpage
skkm#s#",,U3%H%%%EE,,/%7
#T[[%::??57H=5;;=)E
F$$UI6ELL!8'5IE %((E235	5rct|d}||dk7rtdt|}j||}||fS)NrT)rrzcould not find object)rrrr)rr9r_contentrs    rhtml_getobjz!_url_handler.<locals>.html_getobj8
sISA&;3&=455
--S)g~rcjd}djfdtt||D}|j	|d|z}d|z|fS)Nz$<strong class="title">Error</strong>rmc3@K|]}j|ywr+)rD)rArrs  rrCz3_url_handler.<locals>.html_error.<locals>.<genexpr>D
s FTt{{40FsrJz
Error - %s)rerXrrCrn)rrrer`rs    r
html_errorz _url_handler.<locals>.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)rKrrrr'z
search?keyz	topic?keyzget?keyz
bad pydoc url)rrrrra)rcomplete_urlr_roprrrrrryrrrrs       r
get_html_pagez#_url_handler.<locals>.get_html_pageI
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:CDC)&DC&#D%C&&D)D=D?DD	D"DD"r"rTNr$rKr%zunknown content type z	 for url )r\rrr
dirnamerealpathrrXr	readlinesrG)rr,rkr	path_hererhfprrrryrrjrrrs       @@@@@@@@@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_browserracddl}tt||}|jrt	|jy|j
rd}|r|j
|j	t	d|jt	||j
rZtd}|j}|dk(rn9|dk(r|j
|jnt	||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)
webbrowserrcrrJrrIrrrr'rrrZ)r8rrar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.rDrrsep)rs rispathr
s%a5!&&.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)
rcurdirgetcwdr
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
}|	dk(r
t|
y|	dk(rd
}|
}|	d
k(rd
}|	dk(s7d
}|
}<|rt
|||y|s||D]}t|rBtjj|s#td|ztjd	t|r*tjj|rt|}|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.<locals>.BadUsageN)r)rrrrrBadUsager
srrrTzbk:n:p:wFrz-bTz-kz-pz-wz-n)rarzfile %r does not existrapydoc - the Python documentation tool

{cmd} <name> ...
    Show text documentation on something.  <name> 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 <name> 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 <keyword>
    Search for a keyword in the synopsis lines of all available modules.

{cmd} -n <hostname>
    Start an HTTP server with the given hostname (default: localhost).

{cmd} -p <port>
    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 <name> ...
    Write out the HTML documentation for a module to a file in the current
    directory.  If <name> contains a '{sep}', it is treated as a filename; if
    it names a directory, documentation is written for all the contents.
)rr)getoptrrr	rrrrrr
existsrexitrrrrrrrrrJrrr&r)rroptsrwritingstart_serverrr8raoptvalargrrs              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>GGBIIrr)r) Python Library Documentation: %srN)rrNF)rKN)r%)br@rrrrrrimportlib._bootstraprimportlib._bootstrap_externalimportlib.machineryimportlib.utilrrrrrrMr	r.r_rurllib.parserrcollectionsrreprlibr	tracebackrrr$r>r7rIrQrZr]rdrhrpr
IGNORECASErrrtrwr}rrlall_feature_namesrrrrrrrrrrrrr1r\rJrPrrrrrrrrrrrrfrrrrr=rrr
rrrrcrrrrrrr)rrr<module>rs[%L(
)
$			
+

1f
! A
 Gbjj5r}}E(

"J889(0	
" %NK	K&+$ !(X66t(t(Tl7cl7`:t:@cBG"H#0
/F
*2X2 6*yO	y>KLC6DE!"#UUnx;;z
<UpiPX (4+ (J68#T!lzEr