Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/root/sys/lib/python2.7/pydoc.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�`^c@s8dZdZdZdZdZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlmZddlmZmZmZmZmZmZmZmZdd	lmZydd
lmZWn'ek
r!defd��YZnXd
�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%ej&dej'�Z(d�Z)d�Z*d�Z+d�Z,e-e-d�Z.d�Z/y
e0Z1Wn9e2k
r�de3fd��YZ1dZ4dd�Z5n%Xddl6Z6e6j7�Z4e-d�Z5d �Z8d!�Z9d"�Z:id#�Z;d$e<fd%��YZ=d&�Z>d'id(�Z?d)fd*��YZ@d+efd,��YZAd-e@fd.��YZBd/efd0��YZCd1e@fd2��YZDd3�aEd4�ZFd5�ZGd6�ZHd7�ZId8�ZJd9�ZKd:�ZLd'd;�ZMeD�ZNeB�ZOd<fd=��YZPeQeP��ZRd'd>�ZSd?d'd@�ZTd?d'dA�ZUd'dB�ZVdCe-dD�ZWdEfdF��YZXeX�ZYdGfdH��YZZdIfdJ��YZ[dK�Z\e-e-dL�Z]dM�Z^dN�Z_dO�Z`eadPkr4e`�ndS(QsGenerate Python documentation in HTML or text for interactive use.

In the Python interpreter, do "from pydoc import help" to provide online
help.  Calling help(thing) on a Python object documents the object.

Or, at the shell command line outside of Python:

Run "pydoc <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 -p <port>" to start an HTTP server on a given port on the
local machine to generate documentation web pages.

For platforms without a command line, "pydoc -g" starts the HTTP server
and also pops up a little window for controlling it.

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

    http://docs.python.org/library/

This can be overridden by setting the PYTHONDOCS environment variable
to a different URL or to a local directory containing the Library
Reference Manual pages.
sKa-Ping Yee <ping@lfw.org>s26 February 2001s$Revision: 88564 $s�Guido 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.
i�N(tRepr(t
expandtabstfindtjointlowertsplittstriptrfindtrstrip(t
extract_tb(tdequeR
cBseZd�ZRS(cCs
|jd�S(Ni(tpop(tself((s/sys/lib/python2.7/pydoc.pytpopleft@s(t__name__t
__module__R
(((s/sys/lib/python2.7/pydoc.pyR
?scCs�g}g}xvtjD]k}tjj|p.d�}tjj|�}||krtjj|�r|j|�|j|�qqW|S(sAConvert sys.path into a list of absolute, existing, unique paths.t.(tsystpathtostabspathtnormcasetisdirtappend(tdirstnormdirstdirtnormdir((s/sys/lib/python2.7/pydoc.pytpathdirsEs
cCsOtj|�ptj|�}t|�}|rKtjddt|��pNdS(s-Get the doc string or comments for an object.s^ *
t(tinspecttgetdoctgetcommentst_encodetretsubR(tobjecttresult((s/sys/lib/python2.7/pydoc.pyRQscCs�tt|�d�}t|�dkr5|ddfSt|�dkrst|d�rs|dt|dd�fSdt|d�fS(s>Split a doc string into a synopsis line (if any) and the rest.s
iiRi(RRtlenRR(tdoctlines((s/sys/lib/python2.7/pydoc.pytsplitdocWs#cCs0|j}|j|kr,|jd|}n|S(s@Get a class name and qualify it with a module name if necessary.R(RR(R$tmodnametname((s/sys/lib/python2.7/pydoc.pyt	classname`s	cCsYtj|�pWtj|�pWtj|�pWtj|�pWtj|�pWtj|�S(s>Check if an object is of a type that probably means it's data.(Rtismoduletisclasst	isroutinetisframetistracebacktiscode(R$((s/sys/lib/python2.7/pydoc.pytisdatagscGs;x4|r6tt||d�|d�}|d}qW|S(s/Do a series of global replacements on a string.iii(RR(ttexttpairs((s/sys/lib/python2.7/pydoc.pytreplacems	 cCsbt|�|kr^td|dd�}td|d|�}|| d|t|�|S|S(sCOmit part of a string if needed to make it fit in a maximum length.iiis...(R&tmax(R4tmaxlentpretpost((s/sys/lib/python2.7/pydoc.pytcramts
s at 0x[0-9a-f]{6,16}(>+)$cCstjd|�S(s>Remove the hexadecimal id from a Python object representation.s\1(t_re_stripidR#(R4((s/sys/lib/python2.7/pydoc.pytstripid}scCstj|�ptj|�S(N(Rtismethodtismethoddescriptor(tobj((s/sys/lib/python2.7/pydoc.pyt_is_some_method�scCs�i}x*tj|t�D]\}}d||<qWx$|jD]}|jt|��q=Wx'|j�D]}t||�||<qgW|S(Ni(Rt
getmembersRAt	__bases__tupdatet
allmethodstkeystgetattr(tcltmethodstkeytvaluetbase((s/sys/lib/python2.7/pydoc.pyRE�scCsPg}g}x7|D]/}||�r5|j|�q|j|�qW||fS(s�Split 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(tst	predicatetyestnotx((s/sys/lib/python2.7/pydoc.pyt_split_list�s
cCs�d}||krd	S|jd
�r8|jd
�r8dS|jd�rZt|d
�rZdS|dk	rp||kS|jd�SdS(s3Decide whether to show documentation on a variable.t__builtins__t__doc__t__file__t__path__RRt	__slots__t__package__it__it_t_fieldsN(s__builtins__s__doc__s__file__s__path__s
__module__s__name__s	__slots__s__package__(t
startswithtendswiththasattrtNone(R+tallR@t
_hidden_names((s/sys/lib/python2.7/pydoc.pytvisiblename�s
cCsd�}t|tj|��S(sCWrap inspect.classify_class_attrs, with fixup for data descriptors.cSs:|\}}}}tj|�r*d}n||||fS(Nsdata descriptor(Rtisdatadescriptor(tdataR+tkindtclsRK((s/sys/lib/python2.7/pydoc.pytfixup�s	(tmapRtclassify_class_attrs(R$Rg((s/sys/lib/python2.7/pydoc.pyRi�s	t_unicodecBseZRS((RR(((s/sys/lib/python2.7/pydoc.pyRj�stasciicCs|S(N((R4tencoding((s/sys/lib/python2.7/pydoc.pyR!�scCs-t|t�r%|j|ptd�S|SdS(Ntxmlcharrefreplace(t
isinstancetunicodetencodet	_encoding(R4Rl((s/sys/lib/python2.7/pydoc.pyR!�scCs)t|t�r|jtd�St|�S(NRm(RnRjRpRqtstr(R@((s/sys/lib/python2.7/pydoc.pyt_binstr�scCsStjj|�rOx:dD]/}tjjtjj|d|��rtSqWntS(s3Guess whether a path refers to a package directory.s.pys.pycs.pyot__init__(s.pys.pycs.pyo(RRRtisfileRtTruetFalse(Rtext((s/sys/lib/python2.7/pydoc.pyt	ispackage�s

%cCs�|j�}x7|d dks,t|�rE|j�}|sPqqWt|�}|d dkro|d}n|d dkr�d}|ddkr�|d }nx&t|�s�|j�}|s�Pq�q�Wtt|d�d	�}nd}|S(
Nit#isr"""is"""i�s\i(treadlineRRR_(tfiletlineR%((s/sys/lib/python2.7/pydoc.pytsource_synopsis�s& 


cCs
tj|�j}|j|d�\}}|dksB||krtj|�}yt|�}Wntk
rudSX|r�d|dkr�y t	j
d|||d�}WndSX|jp�dj�d}t
jd=nt|�}|j�||f||<n|S(	s.Get the one-line summary out of a module file.tbit__temp__iRiN(NN(Rtstattst_mtimetgetR_Rt
getmoduleinfotopentIOErrortimptload_moduleRTt
splitlinesRtmodulesR~tclose(tfilenametcachetmtimet
lastupdateR%tinfoR|tmodule((s/sys/lib/python2.7/pydoc.pytsynopsis�s&
 

tErrorDuringImportcBs eZdZd�Zd�ZRS(sEErrors that occurred while trying to import something to document it.cCs7|\}}}||_||_||_||_dS(N(R�texcRKttb(RR�texc_infoR�RKR�((s/sys/lib/python2.7/pydoc.pyRts
			cCsA|j}t|�tjkr*|j}nd|j||jfS(Nsproblem in %s - %s: %s(R�ttypettypest	ClassTypeRR�RK(RR�((s/sys/lib/python2.7/pydoc.pyt__str__s	(RRRTRtR�(((s/sys/lib/python2.7/pydoc.pyR�	s	cCs�tj�}t|d�}|jt|��|krBtj}n	tj}|j�tj	j
|�}tj	j|�\}}t|d�}y%tj||||d|f�}Wnt
|tj���nX|j�|S(s<Import a Python source file or compiled file given its path.tr(R�t	get_magicR�treadR&tPY_COMPILEDt	PY_SOURCER�RRtbasenametsplitextR�R�RR�(RtmagicR|ReR�R+RxR�((s/sys/lib/python2.7/pydoc.pyt
importfiles	
%
icCs�y�|r�|tjkr�|tjkr�gtjD]}|j|d�r1|^q1}x3|g|D]!}tj|||<tj|=qdWq�nt|�}Wn�tj�\}}}	}
|tjkr�tj|j|
��qJ|tkrt|j	|
��qJ|t
kr1t|	�dddkr1dSt|tj���nXxCt
|d�dD].}yt||�}Wq^tk
r�dSXq^W|S(s�Import 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).Ri�it
safeimportiN(RR�tbuiltin_module_namesR\t
__import__R�R�RUtSyntaxErrorR�tImportErrorR	R_RRGtAttributeError(Rt	forceloadR�tmtsubsRJR�R�RKR�R�tpart((s/sys/lib/python2.7/pydoc.pyR�+s./&
	tDoccBsCeZdd�Zdd�ZeZZZZZ	Z
d�ZRS(cGs�||f|}tj|�r,|j|�Stj|�rH|j|�SyXtj|�rg|j|�Stj|�r�|j|�Stj|�r�|j	|�SWnt
k
r�nXt|t�r�|j
|�S|j|�S(s%Generate documentation for an object.(RtisgetsetdescriptortdocdatatismemberdescriptorR-t	docmoduleR.tdocclassR/t
docroutineR�Rntpropertytdocpropertytdocother(RR$R+targs((s/sys/lib/python2.7/pydoc.pytdocument^s"





cGs6d|odt|�t|�jf}t|�dS(s+Raise an exception for unimplemented types.s.don't know how to document object%s of type %st N(treprR�Rt	TypeError(RR$R+R�tmessage((s/sys/lib/python2.7/pydoc.pytfailps&cCs#ytj|�}Wntk
r,d}nXtjjdd�}tjjtj	ddtj
dd!�}t|tt��r|j
dks�|j|�r|jtjj|d��r|j
dkr|jd�r�|jd�|j
f}qtjj||j
d�}nd}|S(s*Return the location of module docs or Nones
(built-in)t
PYTHONDOCSshttp://docs.python.org/librarytlibtpythoniiterrnot
exceptionstgcR�tmarshaltposixtsignalRtthreadt	zipimports
site-packagess	xml.etreestest.pydoc_modshttp://s%s/%st/s.html(
serrnos
exceptionsR�simpsmarshalsposixssignalssysR�s	zipimport(s	xml.etreestest.pydoc_modN(Rt
getabsfileR�RtenvironR�RRRtexec_prefixtversionRnR�RR\RR_(RR$R|tdocloctbasedir((s/sys/lib/python2.7/pydoc.pyt	getdoclocxs(

		N(RRR_R�R�R�R�R�R�R�R�R�(((s/sys/lib/python2.7/pydoc.pyR�]stHTMLReprcBsPeZdZd�Zd�Zd�Zd�Zd�ZeZd�Z	eZ
RS(sBClass for safely making an HTML representation of a Python object.cCs:tj|�d|_|_d|_d|_|_dS(Nii
id(RRttmaxlisttmaxtupletmaxdictt	maxstringtmaxother(R((s/sys/lib/python2.7/pydoc.pyRt�s
	cCst|dddddd�S(Nt&s&amp;t<s&lt;t>s&gt;(R6(RR4((s/sys/lib/python2.7/pydoc.pytescape�scCstj||�S(N(RR�(RR$((s/sys/lib/python2.7/pydoc.pyR��scCs�tt|�d�r_dttt|�j�d�}t||�r_t||�||�Sn|jttt	|��|j
��S(NRtrepr_RZ(R^R�RRRRGR�R;R=R�R�(RRQtlevelt
methodname((s/sys/lib/python2.7/pydoc.pytrepr1�s
"cCst||j�}t|�}d|krcdt|dd�krcd|d|j|�|dStjdd|j|��S(Ns\s\\RR�is-((\\[\\abfnrtv\'"]|\\[0-9]..|\\x..|\\u....)+)s<font color="#c040c0">\1</font>(R;R�R�R6R�R"R#(RRQR�ttestttestrepr((s/sys/lib/python2.7/pydoc.pytrepr_string�s$!	cCsKy)|jttt|��|j��SWn|jd|jj�SXdS(Ns
<%s instance>(R�R;R=R�R�t	__class__R(RRQR�((s/sys/lib/python2.7/pydoc.pyt
repr_instance�s)(RRRTRtR�R�R�R�trepr_strR�trepr_unicode(((s/sys/lib/python2.7/pydoc.pyR��s						tHTMLDoccBsOeZdZe�ZejZejZd�Zdd�Zddddd�Z
d�Zd�Zd	d
�Z
d�Zd�Zd
�Zd�Zd�Zdiiid�Zdd�Zddd�Zddiid�Zd�Zddiiidd�Zd�Zdddd�Zddd�Zdddd�Zdd�ZRS(s'Formatter class for HTML documentation.cCstd||fd�S(sFormat an HTML page.s�
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: %s</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">
%s
</body></html>Rk(R!(Rttitletcontents((s/sys/lib/python2.7/pydoc.pytpage�sRcCsd|||||pdfS(sFormat a page heading.s'
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="%s">
<td valign=bottom>&nbsp;<br>
<font color="%s" face="helvetica, arial">&nbsp;<br>%s</font></td
><td align=right valign=bottom
><font color="%s" face="helvetica, arial">%s</font></td></tr></table>
    s&nbsp;((RR�tfgcoltbgcoltextras((s/sys/lib/python2.7/pydoc.pytheading�s	is&nbsp;c	
Csz|dkr!dd|d}nd|||f}	|rW|	d||||f}	n|	d|||f}	|	d|S(	s Format a section with a heading.s<tt>s&nbsp;s</tt>s�<p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="%s">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="%s" face="helvetica, arial">%s</font></td></tr>
    sR
<tr bgcolor="%s"><td rowspan=2>%s</td>
<td colspan=2>%s</td></tr>
<tr><td>%s</td>s(
<tr><td bgcolor="%s">%s</td><td>%s</td>s'
<td width="100%%">%s</td></tr></table>N(R_(
RR�R�R�R�twidthtpreludet
marginaliatgapR%((s/sys/lib/python2.7/pydoc.pytsection�scGsd|}|j||�S(s$Format a section with a big heading.s<big><strong>%s</strong></big>(R�(RR�R�((s/sys/lib/python2.7/pydoc.pyt
bigsection�s
c
Cs7|jt|��}t|dddddddd�S(s!Format literal preformatted text.s

s
 
R�s&nbsp;s
s<br>
(R�RR6(RR4((s/sys/lib/python2.7/pydoc.pyt	preformat�sicCs�d}t|�|d|}x�t|�D]u}|dd|}xPt|||||�D]3}|t|�kr_||||�d}q_q_W|d}q+Wd|S(s0Format a list of items into a multi-column list.Ris<td width="%d%%" valign=top>ids<br>
s</td>s7<table width="100%%" summary="list"><tr>%s</tr></table>(R&trange(RtlisttformattcolsR%trowstcolti((s/sys/lib/python2.7/pydoc.pytmulticolumn�s"cCsd|S(Ns<font color="#909090">%s</font>((RR4((s/sys/lib/python2.7/pydoc.pytgrey
scGs3x,|D]$}||krd|||fSqW|S(s:Make a link for an identifier, given name-to-URL mappings.s<a href="%s">%s</a>((RR+tdictstdict((s/sys/lib/python2.7/pydoc.pytnamelinks
cCsm|jtjj|j�}}t||�r`t||�|kr`d|j|t||�fSt||�S(sMake a link for a class.s<a href="%s.html#%s">%s</a>(RRR�R�RR^RGR,(RR$R*R+R�((s/sys/lib/python2.7/pydoc.pyt	classlinks
$cCsd|j|jfS(sMake a link for a module.s<a href="%s.html">%s</a>(R(RR$((s/sys/lib/python2.7/pydoc.pyt
modulelinkscCso|\}}}}|r%|j|�S|r>d||f}n
d|}|r[d|}n|}d||fS(s;Make a link for a module or package to display in an index.s
%s.%s.htmls%s.htmls"<strong>%s</strong>&nbsp;(package)s<a href="%s">%s</a>(R�(RRdR+RRytshadowedturlR4((s/sys/lib/python2.7/pydoc.pyt
modpkglinks


cCs|p|j}g}d}tjd�}x�tr�j||�}	|	sOPn|	j�\}
}|j||||
!��|	j�\}}
}}}}|
r�||�jdd�}|jd||f�n|rdt	|�}|jd|||�f�n�|r=dt	|�}|jd|||�f�n�|r�|||d!d	krz|jd
|j
||��q�jd|�nR|||d!d	kr�|j|j
||||��n|j|j
||��|}q-W|j|||��t|d�S(
s�Mark up some plain text, given a context of symbols to look for.
        Each context dictionary maps object names to anchor names.isD\b((http|ftp)://\S+[\w/]|RFC[- ]?(\d+)|PEP[- ]?(\d+)|(self\.)?(\w+))t"s&quot;s<a href="%s">%s</a>s'http://www.rfc-editor.org/rfc/rfc%d.txts(http://www.python.org/dev/peps/pep-%04d/it(sself.sself.<strong>%s</strong>R(R�R"tcompileRvtsearchtspanRtgroupsR6tintRR(RR4R�tfuncstclassesRItresultstheretpatterntmatchtstarttendR`tschemetrfctpeptselfdotR+R((s/sys/lib/python2.7/pydoc.pytmarkup.s<	   "
c
Csd}x�D]�t|�td	�kr�|\}}|d}||j||�}|r�||fkr�g}x'|D]}	|j|j|	|��qyW|dt|d�d}n|d}q
t|�tg�kr
|d|j|||�}q
q
Wd|S(
sAProduce HTML for a class tree as given by inspect.getclasstree().Rs"<dt><font face="helvetica, arial">Rs, t)s
</font></dt>s
<dd>
%s</dd>
s
<dl>
%s</dl>
((R�RRRt
formattree(
RttreeR*tparentR%tentrytctbasestparentsRL((s/sys/lib/python2.7/pydoc.pyRYs 



c$Gs�|j}y
|j}Wntk
r/d}nXt|d�}g}xJtt|�d�D]2}|jdt||d d�||f�q\Wt||dd�}	d|	}
yVt	j
|�}|}tjdkr�dl
}
|
j|�}nd||f}Wntk
r"d	}nXg}t|d
�r�t|j�}|d d.kr}|ddkr}t|dd!�}n|jd|j|��nt|d�r�|j|jt|j���n|r�
dt|d�}
n|j|�}|dk	rdt�}nd}|j|
ddd||�}t	j|t	j�}gi}}x�t	j|t	j�D]t\}}|dk	s�t	j|�p�||krtt|||�r�j||f�d|||<||<q�tqtWx�|D]�\}}x�|jD]�}|j|j}}tj j!|�}||kr	|r	t||�r	t"||�|kr�||kr�|d|||<||<q�q�q	q	Wq�i}}x�t	j|t	j#�D]�\}}|dk	st	j$|�st	j|�|kr�t|||�rY|j||f�d|||<t	j%|�rV||||<qVqYq�q�Wg}xHt	j|t&�D]4\}}t|||�rv|j||f�qvqvW|j't(|�|j)||�}|o�d|}|d|}t|d�rg}x<t*j+|j,�D](\} }}!|j|||!df�qW|j-�|j.||j/�}"||j0ddd|"�}n=|r�|j.||d ��}"||j0d!dd|"�}n|rSt1d"�|�}#|j2t	j3|#d�|�g}"x6|D].\}}|"j|j4|||||��q�|j0d#dd$t|"��}n|r�g}"x6|D].\}}|"j|j4|||||��qfW||j0d%dd&t|"��}n|r!g}"x-|D]%\}}|"j|j4||��q�W||j0d'dd(t|"d)��}nt|d*�rm|j't|j5�|j)�}"||j0d+dd|"�}nt|d,�r�|j't|j6�|j)�}"||j0d-dd|"�}n|S(/s/Produce HTML documentation for a module object.Ris5<a href="%s.html"><font color="#ffffff">%s</font></a>i�s)<big><big><strong>%s</strong></big></big>twin32Ns<a href="file:%s">%s</a>s
(built-in)t__version__it$s
Revision: s
version %st__date__s (%s)s, s(<br><a href="%(docloc)s">Module Docs</a>Rs#ffffffs#7799ees<a href=".">index</a><br>Rzs.html#s#-s<tt>%s</tt>s
<p>%s</p>
RVisPackage Contentss#aa55cccSs|j|d�S(Ni(R(t	key_valueRM((s/sys/lib/python2.7/pydoc.pyt<lambda>�stModulescSs|dS(Ni((R'((s/sys/lib/python2.7/pydoc.pyR(�stClassess#ee77aat	Functionss#eeaa77tDatas#55aa55s<br>
t
__author__tAuthort__credits__tCreditss$Revision: (7Rt__all__R�R_RR�R&RRRR�Rtplatformt
nturl2pathtpathname2urlR�R^RsR$RR�R&R�tlocalsR�RBR-R.t	getmoduleRbRCRR�R�RGR/t	isbuiltint
isfunctionR3RRR�tpkgutiltiter_modulesRVtsortR�RR�RhRtgetclasstreeR�R-R/($RR$R+tmodtignoredR`tpartstlinksR�t
linkednametheadRRR3tfilelinkR�R�R�R%R�RtcdictRJRKRLR*R�RtfdictRdR'tmodpkgstimportertispkgR�t	classlist((s/sys/lib/python2.7/pydoc.pyR�ls�	


'


 "	
" !+
"$!"
		!&	&				cs�j}|p|}�j}g}	|	j�dd(�fd��Y}
|
��ttj���}t|�dkr��j��d�x+|D]#}�d�j|�j	��q�W�d�n��������fd�}
����fd�}��������fd	�}t
�fd
�t���}i�x}|D]u\}}}}d|d|�|<}yt�|�}Wnt
k
r�nXy|�|<WqPtk
r�qPXqPWxn|r9|r�j��n|d
d�t|�fd��\}}�tjkr.|}q�n.��krCd}nd�j��j	�}|d7}y|jdd��Wn!tk
r�|jd��nX|
d||d��}|
d||d��}|
d||d��}|d||d��}|d||d��}|gks0t�|}q�Wdj|	�}	||krhd ||f}nd!|||f}|r�g}x*|D]"}|j�j|�j	��q�W|d"t|d#�}n�jt���j����}|o�|}�j|d%d&|	d'|�S()s.Produce HTML documentation for a class object.tHorizontalRulecs eZd�Z�fd�ZRS(cSs
d|_dS(Ni(tneedone(R((s/sys/lib/python2.7/pydoc.pyRt�scs#|jr�d�nd|_dS(Ns<hr>
i(RK(R(tpush(s/sys/lib/python2.7/pydoc.pytmaybe�s	
(RRRtRM((RL(s/sys/lib/python2.7/pydoc.pyRJ�s	is&<dl><dt>Method resolution order:</dt>
s<dd>%s</dd>
s</dl>
c
s�t||�\}}|r��j��|�x�|D]�\}}}}yt�|�}Wn*tk
r���j||���n&X��j||��������d�q6Wn|S(Ns
(RRRMRGt	Exceptiont_docdescriptorR�(tmsgtattrsRNtokR+RethomeclsRK(RRthrtmdictR=R$RLR(s/sys/lib/python2.7/pydoc.pytspills


cslt||�\}}|rh�j��|�x6|D]+\}}}}��j||���q6Wn|S(N(RRRMRO(RPRQRNRRR+ReRSRK(RTR=RLR(s/sys/lib/python2.7/pydoc.pytspilldescriptorss

 c
st||�\}}|r�j��|�x�|D]�\}}}}�jt�|�|��}t|d�s�tj|�r�t|dd�}	nd}	|	dkr��d|�nB�jt	|��j
����}	d|	}	�d||	f��d�q6Wn|S(Nt__call__RTs<dl><dt>%s</dl>
s<dd><tt>%s</tt>s<dl><dt>%s%s</dl>
s
(RRRMR�RGR^RRcR_RRR�(
RPRQRNRRR+ReRSRKRLR'(RRRTRUR=R$RLR(s/sys/lib/python2.7/pydoc.pyt	spilldata!s$


cst|dd��S(NiR@(Rb(Rd(R$(s/sys/lib/python2.7/pydoc.pyR(7sRzt-ics|d�kS(Ni((tt(t	thisclass(s/sys/lib/python2.7/pydoc.pyR(Nssdefined heresinherited from %ss:<br>
RJcSs|dS(Ni((R[((s/sys/lib/python2.7/pydoc.pyR(\scSst|d|d�S(Ni(tcmp(tt1tt2((s/sys/lib/python2.7/pydoc.pyR(^ss
Methods %scSs|ddkS(Nitmethod((R[((s/sys/lib/python2.7/pydoc.pyR(bssClass methods %scSs|ddkS(Nisclass method((R[((s/sys/lib/python2.7/pydoc.pyR(dssStatic methods %scSs|ddkS(Nis
static method((R[((s/sys/lib/python2.7/pydoc.pyR(fssData descriptors %scSs|ddkS(Nisdata descriptor((R[((s/sys/lib/python2.7/pydoc.pyR(hssData and other attributes %scSs|ddkS(NiRd((R[((s/sys/lib/python2.7/pydoc.pyR(jsRs*<a name="%s">class <strong>%s</strong></a>s/<strong>%s</strong> = <a name="%s">class %s</a>s(%s)s, s<tt>%s<br>&nbsp;</tt>s#000000s#ffc8d8i((RRCRR
RtgetmroR&RMRRtfilterRiRGRNR�R
RRt__builtin__R$R;tAssertionErrorRRRR�R�(RR$R+R=RRR>trealnameR!R�RJtmroRLRVRWRYRQRJReRSRKtanchort	inheritedttagR�R"R'((	RRRTRUR=R$RLRR\s/sys/lib/python2.7/pydoc.pyR��s�				



$	$

		









 $cCs|jd|j|��S(s)Format an argument default value as text.t=(R�R�(RR$((s/sys/lib/python2.7/pydoc.pytformatvalue�scCsG|j}|p|}|r$|jp'dd|}	d}
d}tj|�r�|j}|r�||k	r�d|j||�}
q�nD|jdk	r�d|j|jj|�}
nd|j||�}
|j}n||kr�|	|f}
ne|r?||j	kr?|j	||kr?d|jd||f}d	}n|}d
|	||f}
tj
|�r�tj|�\}}}}tj||||d|j
�}|dkr�d
|}
|d	d!}q�nd}|
||
o�jd|
�}|rd|S|jt|�|j|||�}|o2d|}d||fSdS(s;Produce HTML documentation for a function or method object.RRZis from s method of %s instances unbound %s methods$<a name="%s"><strong>%s</strong></a>s<a href="#%s">%s</a>is)<a name="%s"><strong>%s</strong></a> = %sRks<lambda>s$<strong>%s</strong> <em>lambda</em> i�s(...)s'<font face="helvetica, arial">%s</font>s<dl><dt>%s</dt></dl>
s<dd><tt>%s</tt></dd>s<dl><dt>%s</dt>%s</dl>
N(RRR>tim_classRtim_selfR_R�tim_funct__dict__R8t
getargspect
formatargspecRkR�RRR�(RR$R+R=RRRIRHReRgtnotetskipdocstimclassR�treallinkR�tvarargstvarkwtdefaultstargspectdeclR'((s/sys/lib/python2.7/pydoc.pyR��sR				
cCsxg}|j}|r&|d|�n|jdk	ra|jt|�|j�}|d|�n|d�dj|�S(Ns!<dl><dt><strong>%s</strong></dt>
s<dd><tt>%s</tt></dd>
s</dl>
R(RRTR_RRR�R(RR+RKR=RRLR'((s/sys/lib/python2.7/pydoc.pyRO�s	
cCs|j|||�S(s*Produce html documentation for a property.(RO(RR$R+R=RH((s/sys/lib/python2.7/pydoc.pyR��scGs'|rd|pd}||j|�S(s-Produce HTML documentation for a data object.s<strong>%s</strong> = R(R�(RR$R+R=R>tlhs((s/sys/lib/python2.7/pydoc.pyR��scCs|j|||�S(s1Produce html documentation for a data descriptor.(RO(RR$R+R=RH((s/sys/lib/python2.7/pydoc.pyR��scCs�g}|dkri}nxLtj|g�D]8\}}}|j|d|||kf�d||<q.W|j�|j||j�}|j|dd|�S(s2Generate an HTML index for a directory of modules.Ris#ffffffs#ee77aaN(R_R9R:RR;R�RR�(RRRRFRGR+RHR�((s/sys/lib/python2.7/pydoc.pytindex�s	"
N(RRRTR�t_repr_instanceR�R�R�R�R_R�R�R�R�R�RRRRRRR�R�RkR�ROR�R�R�R|(((s/sys/lib/python2.7/pydoc.pyR��s8				
							+|�5	
tTextReprcBs8eZdZd�Zd�Zd�ZeZd�ZRS(sAClass for safely making a text representation of a Python object.cCs:tj|�d|_|_d|_d|_|_dS(Nii
id(RRtR�R�R�R�R�(R((s/sys/lib/python2.7/pydoc.pyRt�s
	cCs{tt|�d�r_dttt|�j�d�}t||�r_t||�||�Snttt|��|j	�S(NRR�RZ(
R^R�RRRRGR;R=R�R�(RRQR�R�((s/sys/lib/python2.7/pydoc.pyR��s
"cCs^t||j�}t|�}d|krZdt|dd�krZd|d||dS|S(Ns\s\\RR�i(R;R�R�R6(RRQR�R�R�((s/sys/lib/python2.7/pydoc.pyR��s
$cCs9y ttt|��|j�SWnd|jjSXdS(Ns
<%s instance>(R;R=R�R�R�R(RRQR�((s/sys/lib/python2.7/pydoc.pyR��s (RRRTRtR�R�R�R�(((s/sys/lib/python2.7/pydoc.pyR~�s				tTextDoccBs�eZdZe�ZejZd�Zdd�Zd�Zddd�Z
ddd�Zddd�Zd	�Z
dddd
�Zd�Zdddd�Zdddd
�Zdddddd�ZRS(s'Formatter class for text documentation.cCsttd�|�d�S(s(Format a string in bold by overstriking.cSs|d|S(Ns((tch((s/sys/lib/python2.7/pydoc.pyR(sR(RRh(RR4((s/sys/lib/python2.7/pydoc.pytbold
ss    cCsX|s
dSt|d�}t|d�|�}|rKt|d�|d<nt|d�S(s6Indent text by prepending a given prefix to each line.Rs
cSs||S(N((R}tprefix((s/sys/lib/python2.7/pydoc.pyR(si�(RRhRR(RR4R�R(((s/sys/lib/python2.7/pydoc.pytindentscCs(|j|�dt|j|��dS(s&Format a section with a given heading.s
s

(R�RR�(RR�R�((s/sys/lib/python2.7/pydoc.pyR�sRc
Cs�d}x�|D]�}t|�td�kr�|\}}||t||�}|r�||fkr�t|d�|�}	|dt|	d�}n|d}q
t|�tg�kr
||j||||d�}q
q
W|S(sBRender in text a class tree as returned by inspect.getclasstree().RcSs
t||�S(N(R,(R R�((s/sys/lib/python2.7/pydoc.pyR($ss(%s)s, s
s    ((R�R,RhRR(
RRR*RR�R%RR R!R"((s/sys/lib/python2.7/pydoc.pyRs

	cCs�|j}tt|��\}}|jd||o:d|�}y
|j}Wntk
rgd }nXytj|�}Wnt	k
r�d}nX||jd|�}|j
|�}	|	d k	r�||jd|	�}n|r�|jd|�}ng}
xutj|tj�D]^\}}|d k	sMtj
|�pD||krt|||�rx|
j||f�qxqqWg}
x~tj|tj�D]g\}}|d k	s�tj|�s�tj
|�|kr�t|||�r�j||f�q�q�Wg}xHtj|t�D]4\}}t|||�r|j||f�qqWg}t�}t|d�r�tj|j�D]C\}}}|j|�|r�|j|d�q�|j|�q�W|j�||jd	t|d
��}ng}xUtj|tj�D]>\}}|jj|d�r||kr|j|�qqW|r�|j�||jdt|d
��}n|
rtd
�|
�}|jtj|d�|�g}x0|
D](\}}|j|j |||��q�W||jdt|d
��}n|
rwg}x0|
D](\}}|j|j |||��q)W||jdt|d
��}n|r�g}x6|D].\}}|j|j!|||dd��q�W||jdt|d
��}nt|d�rKt"|j#�}|d d!kr2|ddkr2t$|dd!�}n||jd|�}nt|d�r|||jdt"|j%��}nt|d�r�||jdt"|j&��}nt|d�r�||jdt"|j'��}n|S("s5Produce text documentation for a given module object.tNAMEs - s
(built-in)tFILEsMODULE DOCStDESCRIPTIONRVs
 (package)sPACKAGE CONTENTSs
Rt
SUBMODULEScSs|dS(Ni((R'((s/sys/lib/python2.7/pydoc.pyR(psitCLASSESt	FUNCTIONSR8iFtDATAR$iR%s
Revision: i�tVERSIONR&tDATER-tAUTHORR/tCREDITSNs$Revision: ((RR)RR�R1R�R_RR�R�R�RBR.R6RbRR/R7R3tsetR^R9R:RVtaddR;RR-R\RhRR<R�R�RsR$RR&R-R/(RR$R+R=tsynoptdescR%R`R|R�RRJRKRRdRFt
modpkgs_namesRGR*RHt
submodulesRIR�R�((s/sys/lib/python2.7/pydoc.pyR�,s�	 




""$	"

	""
	 " "&" """cs&�j}|p|}�j}�jd�}||krOd�j|�}n�j|�d|}|r�t||�}	|dt|	d�}nt��}
|
r�|
dgp�g}|j�tt	j
���}t|�dkr&�d�x"|D]}
�d	||
��q�d
�ndd �fd��Y}|�������fd
�}����fd�}�����fd�}t�fd�t
���}x0|r�r�|j��n|dd�t|�fd��\}}�tjkr|}q�n+��kr.d}ndt��j�}|j�|d||d��}|d||d��}|d||d��}|d||d��}|d||d��}|gks�t�|}q�Wdj|�}|s|dS|d�jt|�d�dS(!s4Produce text documentation for a given class object.cSs
t||�S(N(R,(R R�((s/sys/lib/python2.7/pydoc.pytmakename�ssclass s	 = class s(%s)s, s
isMethod resolution order:s    RRJcs eZd�Z�fd�ZRS(cSs
d|_dS(Ni(RK(R((s/sys/lib/python2.7/pydoc.pyRt�scs'|jr�dd�nd|_dS(NRZiFi(RK(R(RL(s/sys/lib/python2.7/pydoc.pyRM�s	(RRRtRM((RL(s/sys/lib/python2.7/pydoc.pyRJ�s	cs�t||�\}}|r��j��|�xy|D]n\}}}}yt�|�}Wn*tk
r���j||���q6X��j||����q6Wn|S(N(RRRMRGRNROR�(RPRQRNRRR+ReRSRK(RTR=R$RLR(s/sys/lib/python2.7/pydoc.pyRV�s


cslt||�\}}|rh�j��|�x6|D]+\}}}}��j||���q6Wn|S(N(RRRMRO(RPRQRNRRR+ReRSRK(RTR=RLR(s/sys/lib/python2.7/pydoc.pyRW�s

 c	
s�t||�\}}|r��j��|�x�|D]w\}}}}t|d�sftj|�rut|�}nd}��jt�|�|�ddd|�d�q6Wn|S(NRXR8iFR's
(	RRRMR^RRcRR_R�RG(	RPRQRNRRR+ReRSRKR'(RTR=R$RLR(s/sys/lib/python2.7/pydoc.pyRY�s

$cst|dd��S(NiR@(Rb(Rd(R$(s/sys/lib/python2.7/pydoc.pyR(�sics|d�kS(Ni((R[(R\(s/sys/lib/python2.7/pydoc.pyR(�ssdefined heresinherited from %ssMethods %s:
cSs|ddkS(NiR`((R[((s/sys/lib/python2.7/pydoc.pyR(�ssClass methods %s:
cSs|ddkS(Nisclass method((R[((s/sys/lib/python2.7/pydoc.pyR(�ssStatic methods %s:
cSs|ddkS(Nis
static method((R[((s/sys/lib/python2.7/pydoc.pyR(�ssData descriptors %s:
cSs|ddkS(Nisdata descriptor((R[((s/sys/lib/python2.7/pydoc.pyR(�ssData and other attributes %s:
cSs|ddkS(NiRd((R[((s/sys/lib/python2.7/pydoc.pyR(�ss |  ((RRCRR�RhRRRR
RRaR&RbRiR
RRRcR$R,R;RdR�R(RR$R+R=R>ReR!R�R�R"R'R�RfRLRJRVRWRYRQRhRi((RTR=R$RLRR\s/sys/lib/python2.7/pydoc.pyR��sn			


					







cCsd|j|�S(s)Format an argument default value as text.Rj(R�(RR$((s/sys/lib/python2.7/pydoc.pyRkscCs�|j}|p|}d}d}tj|�r�|j}|rd||k	r�dt||�}q�n>|jdk	r�dt|jj|�}ndt||�}|j}n||kr�|j	|�}	nH|r�|j
kr�j
||kr�}n|j	|�d|}	tj|�r�tj|�\}
}}}
tj
|
|||
d|j�}|d	kr�|j	|�d
}	|dd!}q�nd}|	||}|r�|d
St|�p�d}|d
|o�|j|��d
SdS(s;Produce text documentation for a function or method object.Ris from s method of %s instances unbound %s methodis = Rks<lambda>s lambda i�s(...)s
N(RRR>RlR,RmR_R�RnR�RoR8RpRqRkRRR�(RR$R+R=RHReRrRsRtR�R�RvRwRxRyRzR'((s/sys/lib/python2.7/pydoc.pyR�sB			cCszg}|j}|r5||j|��|d�nt|�pDd}|rm||j|��|d�ndj|�S(Ns
R(RR�RR�R(RR+RKR=RRLR'((s/sys/lib/python2.7/pydoc.pyRO7s	

cCs|j|||�S(s*Produce text documentation for a property.(RO(RR$R+R=RH((s/sys/lib/python2.7/pydoc.pyR�DscCs|j|||�S(s1Produce text documentation for a data descriptor.(RO(RR$R+R=RH((s/sys/lib/python2.7/pydoc.pyR�Hsc
Cs�|j|�}|r_|r%|dp(d|}|t|�}	|	dkr_||	 d}q_n|rx|j|�dp{d|}|dk	r�|d|jt|��7}n|S(s-Produce text documentation for a data object.s = Ris...s
N(R�R&R�R_R�Rr(
RR$R+R=RR8R'R�R}tchop((s/sys/lib/python2.7/pydoc.pyR�Ls# N(RRRTR~R}R�R�R�R�R_RR�R�RkR�ROR�R�R�(((s/sys/lib/python2.7/pydoc.pyRs				dx	+	
cCst�at|�dS(sCThe first time this is called, determine what kind of pager to use.N(tgetpagertpager(R4((s/sys/lib/python2.7/pydoc.pyR�Zs	cCs�ttj�tjk	rtSttjd�s2tStjj�sRtjj�rVtSdt	j
kr�tjdkr{d�St	j
jd�dkr�d�Sd	�Snt	j
jd�dkr�tStjdks�jj
d
�r��Stt	d�rt	jd
�dkrd�Sddl}|j�\}}t	j|�z7tt	d�rpt	jd|�dkrpd�StSWdt	j|�XdS(s2Decide what method to use for paging through text.tisattytPAGERR#cSstt|�tjd�S(NR�(t
tempfilepagertplainRR�(R4((s/sys/lib/python2.7/pydoc.pyR(jstTERMtdumbtemacscSstt|�tjd�S(NR�(t	pipepagerR�RR�(R4((s/sys/lib/python2.7/pydoc.pyR(lscSst|tjd�S(NR�(R�RR�(R4((s/sys/lib/python2.7/pydoc.pyR(nstos2cSstt|�d�S(Nsmore <(R�R�(R4((s/sys/lib/python2.7/pydoc.pyR(rstsystems(less) 2>/dev/nullicSs
t|d�S(Ntless(R�(R4((s/sys/lib/python2.7/pydoc.pyR(tsi�Ns	more "%s"cSs
t|d�S(Ntmore(R�(R4((s/sys/lib/python2.7/pydoc.pyR({s(R�R�(R�R�(R�RtstdoutR�tFileTypet
plainpagerR^tstdinR�RR�R2R�R\R�ttempfiletmkstempR�tttypagertunlink(R�tfdR�((s/sys/lib/python2.7/pydoc.pyR�`s4 
!$
(cCstjdd|�S(s%Remove boldface formatting from text.s.R(R"R#(R4((s/sys/lib/python2.7/pydoc.pyR��scCsKtj|d�}y!|jt|��|j�Wntk
rFnXdS(s3Page through text by feeding it to another program.twN(RtpopentwriteR!R�R�(R4tcmdtpipe((s/sys/lib/python2.7/pydoc.pyR��s
cCsvddl}|j�}t|d�}|jt|��|j�ztj|d|d�Wdtj|�XdS(s<Page through text by invoking a program on a temporary file.i�NR�s "R(	R�tmktempR�R�R!R�RR�R�(R4R�R�R�R|((s/sys/lib/python2.7/pydoc.pyR��s
c	Csttt|�ttjdt���jd�}yDddl}tjj	�}|j
|�}|j|�d�}Wn&tt
fk
r�d}d�}nXz9tjjdd�d	}}tjjt|| d�d�x�|r�tjjd
�tjj�|�}|dkr4tjjd
�Pn8|dkrltjjd
||d�|d	}q�|dkr�|||}|dkr�d}q�ntjjdt||||!d�d�||}q�Wd|r�j||j|�nXdS(s%Page through text on a text terminal.Rls
i�NcSstjjd�S(Ni(RR�R�(((s/sys/lib/python2.7/pydoc.pyR(�scSstjj�d d S(Ni�i(RR�R{(((s/sys/lib/python2.7/pydoc.pyR(�stLINESiis
-- more --tqtQs
          
s
RtBsi(R�R�(s
s
(RR�s(R�R!RGRR�RqRtttyR�tfilenot	tcgetattrt	setcbreakR�R�R_RR�R�R�Rtflusht	tcsetattrt	TCSAFLUSH(	R4R(R�R�toldtgetcharR�tincR ((s/sys/lib/python2.7/pydoc.pyR��s@3


!

	
,cCs2tjjtt|�ttjdt���dS(s>Simply print unformatted text.  This is the ultimate fallback.RlN(RR�R�R!R�RGRq(R4((s/sys/lib/python2.7/pydoc.pyR��scCsJtj|�rT|jtjkr,d|jSt|d�rFd|jSd|jSntj|�rnd|jStj|�r�d|jj	|jj|jfStj
|�r�d|jj	|jj|jfStj|�r�|jStj|�rd	|jStj
|�rd
|jSt|�tjkr=d|jjSt|�jS(s/Produce a short description of the given thing.sbuilt-in module RVspackage smodule sbuilt-in function sgetset descriptor %s.%s.%ssmember descriptor %s.%s.%ssclass s	function smethod sinstance of (RR-RRR�R^R7R�t__objclass__RR�R.R8R>R�R�tInstanceTypeR�(tthing((s/sys/lib/python2.7/pydoc.pytdescribe�s2cCs�gt|d�D]}|r|^q}d\}}xQ|t|�kr�tt||d d�|�}|r�||d}}q7Pq7W|r�|}nt}x:||D].}yt||�}Wq�tk
r�dSXq�W|S(s@Locate an object by name or dotted path, importing as necessary.RiiN(Ni(RR_R&R�RRcRGR�(RR�R�R?R�tnt
nextmoduleR$((s/sys/lib/python2.7/pydoc.pytlocate�s ( 	
	t_OldStyleClasscBseZRS((RR(((s/sys/lib/python2.7/pydoc.pyR��scCsst|t�r>t||�}|s4td|�n||fSt|dd�}|t|t�rh|ndfSdS(sDGiven an object or a path to an object, get the object and its name.s$no Python documentation found for %rRN(RnRrR�R�RGR_(R�R�R$R+((s/sys/lib/python2.7/pydoc.pytresolve�s
s Python Library Documentation: %scCs3t||�\}}t|�}tj|�}|r`d|kr`|d||jd� 7}n&|r�||k	r�|d|j7}nt|�tkr�|j}nstj	|�p�j
|�p�j|�p�j|�p�j
|�p�|t�st|�}|d7}n||dtj||�S(sBRender text documentation, given an object or a path to an object.Rs in s in module s objects

(R�R�RR6RRR�t_OLD_INSTANCE_TYPER�R-R.R/R�R�RnR�R4R�(R�R�R�R$R+R�R�((s/sys/lib/python2.7/pydoc.pyt
render_docs$
cCs?ytt|||��Wnttfk
r:}|GHnXdS(sCDisplay text documentation, given an object or a path to an object.N(R�R�R�R�(R�R�R�RK((s/sys/lib/python2.7/pydoc.pyR' scCs�ytt||�\}}tjt|�tj||��}t|dd�}|j|�|j�dG|dGHWntt	fk
r�}|GHnXdS(s<Write HTML documentation to a file in the current directory.s.htmlR�twroteN(
R�thtmlR�R�R�R�R�R�R�R�(R�R�R$R+R�R|RK((s/sys/lib/python2.7/pydoc.pytwritedoc's$

RcCsL|dkri}nx0tj|g|�D]\}}}t|�q+WdS(sAWrite out HTML documentation for all modules in a directory tree.N(R_R9t
walk_packagesR�(RtpkgpathtdoneRGR*RH((s/sys/lib/python2.7/pydoc.pyt	writedocs3s
	%tHelpercBs�eZidd6dd6d(d6d)d6d*d6d+d
6d,d6d-d
6dd6d.d6dd6d/d6dd6d0d6dd6d1d6d2d6d3d6d4d6d d!6d5d"6dd$6dd%6d6d&6d7d'6d8d(6d9d*6d:d6d;d+6d<d6d=d.6Zid>d76d?dL6d@d 6dAdM6dBdZ6dCd[6dDd^6Zid_d>6d`d;6dadb6dcdd6dedf6dgdh6didj6d7dk6dldm6dndo6dpdq6drds6drdt6dudv6dudw6Zxdej�D]V\ZZxGeD]?Zej	ee�Z
ee
kr�
dxeZ
ne
ee<q�Wq�WiNdEd{6dFd76dGd�6dHd�6dId�6dJd�6dKd�6dLd�6dMd^6dNd�6d�d�6dOd#6dPd�6dQd�6dRd�6d{d�6d{d�6dSd�6dTde6dUd�6dVd�6dWd�6dXd6dd�6dYd�6d�dL6d�d�6dZd�6d[d�6d\d6d]d�6d^d�6d_d�6d`d6dad�6dbd�6dcd�6ddd6ded�6dd�6dd�6dfd)6dgd�6dhd�6did�6djd�6dkdl6dld�d�d�dmd�dnd�dod�dpd�6dqd�drdp6dsd�td�ud�6dvd�wd`6dxdM6dyd�zd�{d[6d|d 6d}d6dd6d~d6ddZ6d
d6d'd6d*d	6dd
6dd6d�d6d�d6d�d6d�d6Z
d�d�d�Ze
d��Ze
d��Zd�Ze�Zed�Zd�Zd�Zd�Zd�Zdd d!�Zd"�Zd#�Zd$�Zdd%�Zd&�Zdd'�ZRS(�tBOOLEANtandtwithtastassertRtbreaks	while fortclasssCLASSES SPECIALMETHODStcontinuetfunctiontdeftdeltBASICMETHODStifteliftelsettrytexcepttexectfinallytforsbreak continue whiletimporttfromtglobalt
NAMESPACESt
TRUTHVALUEtMODULEStintSEQUENCEMETHODS2t
COMPARISONtistlambdaR�tnottortpasstprinttraiset
EXCEPTIONStreturntwhilesbreak continue if TRUTHVALUEs CONTEXTMANAGERS EXCEPTIONS yieldtyieldt's'''sr'su's"""Rsr"su"tSTRINGSt+RZt*s**R�s//t%s<<s>>R�t|t^t~R�R�s<=s>=s==s!=s<>t	OPERATORStUNARYs+=s-=s*=s/=s%=s&=s|=s^=s<<=s>>=s**=s//=tAUGMENTEDASSIGNMENTtBITWISEtjtJtCOMPLEXsOPERATORS FORMATTINGtPOWERsTUPLES LISTS FUNCTIONSt,s ATTRIBUTES FLOAT MODULES OBJECTSRtELLIPSISs...sSLICINGS DICTIONARYLITERALSt:s	def classt@s\tPRIVATENAMESRZsPRIVATENAMES SPECIALMETHODSRYt
BACKQUOTESt`sTUPLES FUNCTIONS CALLSRRsLISTS SUBSCRIPTS SLICINGSt[t]R�R�sRSTRINGS UNICODE NUMBERS SEQUENCES MAPPINGS FUNCTIONS CLASSES MODULES FILES inspecttTYPEStstringss4str UNICODE SEQUENCES STRINGMETHODS FORMATTING TYPESsstring-methodssSTRINGS FORMATTINGt
STRINGMETHODSt
formatstringst
FORMATTINGs:encodings unicode SEQUENCES STRINGMETHODS FORMATTING TYPEStUNICODEtnumberssINTEGER FLOAT COMPLEX TYPEStNUMBERStintegerss	int rangetINTEGERtfloatings
float mathtFLOATt	imaginarys
complex cmathttypesseqs%STRINGMETHODS FORMATTING xrange LISTSt	SEQUENCEStDICTIONARIEStMAPPINGSttypesfunctionss	def TYPESttypesmethodssclass def CLASSES TYPEStMETHODSsbltin-code-objectsscompile FUNCTIONS TYPEStCODEOBJECTSsbltin-type-objectsstypes TYPEStTYPEOBJECTStFRAMEOBJECTSt
TRACEBACKSsbltin-null-objecttNONEsbltin-ellipsis-objecttSLICINGSsbltin-file-objectstFILEStspecialattrstSPECIALATTRIBUTESs!class SPECIALMETHODS PRIVATENAMESR�ttypesmodulestPACKAGESsoperator-summarys�lambda or and not in is BOOLEAN COMPARISON BITWISE SHIFTING BINARY FORMATTING POWER UNARY ATTRIBUTES SUBSCRIPTS SLICINGS CALLS TUPLES LISTS DICTIONARIES BACKQUOTEStEXPRESSIONSt
PRECEDENCEtobjectstOBJECTStspecialnamesstBASICMETHODS ATTRIBUTEMETHODS CALLABLEMETHODS SEQUENCEMETHODS1 MAPPINGMETHODS SEQUENCEMETHODS2 NUMBERMETHODS CLASSEStSPECIALMETHODSt
customizations cmp hash repr str SPECIALMETHODSsattribute-accesssATTRIBUTES SPECIALMETHODStATTRIBUTEMETHODSscallable-typessCALLS SPECIALMETHODStCALLABLEMETHODSssequence-typess)SEQUENCES SEQUENCEMETHODS2 SPECIALMETHODStSEQUENCEMETHODS1ssequence-methodss)SEQUENCES SEQUENCEMETHODS1 SPECIALMETHODSsMAPPINGS SPECIALMETHODStMAPPINGMETHODSs
numeric-typess*NUMBERS AUGMENTEDASSIGNMENT SPECIALMETHODSt
NUMBERMETHODSt	execmodels%NAMESPACES DYNAMICFEATURES EXCEPTIONSt	EXECUTIONtnamings*global ASSIGNMENT DELETION DYNAMICFEATURESsdynamic-featurestDYNAMICFEATUREStSCOPINGtFRAMESR�stry except finally raisescoercion-rulestCONVERSIONSt	COERCIONStconversionstidentifiersskeywords SPECIALIDENTIFIERStIDENTIFIERSs
id-classestSPECIALIDENTIFIERSsatom-identifierss
atom-literalssHSTRINGS BACKQUOTES NUMBERS TUPLELITERALS LISTLITERALS DICTIONARYLITERALStLITERALStTUPLESt	exprlistssTUPLES LITERALSt
TUPLELITERALSstypesseq-mutabletLISTLITERALStLISTStlistssLISTS LITERALSttypesmappingtDICTIONARYLITERALSRsDICTIONARIES LITERALSsstring-conversionssrepr str STRINGS LITERALSsattribute-referencess(getattr hasattr setattr ATTRIBUTEMETHODSt
ATTRIBUTESt
subscriptionst
SUBSCRIPTStslicingstcallstCALLStpowertunarytbinarytBINARYtshiftingtSHIFTINGtbitwisetcomparisonssEXPRESSIONS BASICMETHODStbooleanssEXPRESSIONS TRUTHVALUEt	ASSERTIONt
assignmentt
ASSIGNMENTt	augassigntDELETIONtPRINTINGt	RETURNINGt	IMPORTINGtCONDITIONALtcompoundsfor while break continuetLOOPINGttruths if while and or not BASICMETHODStdebuggertpdbt	DEBUGGINGscontext-managerstCONTEXTMANAGERScCs||_||_dS(N(t_inputt_output(Rtinputtoutput((s/sys/lib/python2.7/pydoc.pyRt�s	cCs|jptjS(N(RuRR�(R((s/sys/lib/python2.7/pydoc.pyR(�scCs|jptjS(N(RvRR�(R((s/sys/lib/python2.7/pydoc.pyR(�scCs)tj�dddkr%|�dSdS(Niit?Rs<pydoc.Helper instance>(Rtstack(R((s/sys/lib/python2.7/pydoc.pyt__repr__�scCsG||jk	r|j|�n$|j�|j�|jjd�dS(Ns
You are now leaving help and returning to the Python interpreter.
If you want to ask for help on a particular object directly from the
interpreter, you can type "help(object)".  Executing "help('string')"
has the same effect as typing a particular string at the help> prompt.
(t_GoInteractivethelptintrotinteractRxR�(Rtrequest((s/sys/lib/python2.7/pydoc.pyRX�s

	cCs�|jjd�x�tr�y|jd�}|s5PnWnttfk
rPPnXtt|dddd��}t|�dkr�Pn|j	|�qWdS(	Ns
shelp> RRR�R�tquit(R�squit(
RxR�RvtgetlinetKeyboardInterrupttEOFErrorRR6RR}(RR�((s/sys/lib/python2.7/pydoc.pyRs	cCsJ|jtjkrt|�S|jj|�|jj�|jj�SdS(s.Read one line, using raw_input when available.N(RwRR�t	raw_inputRxR�R�R{(Rtprompt((s/sys/lib/python2.7/pydoc.pyR�s


cCs{t|�td�krA|j�}|dkr=|j�qg|dkrV|j�qg|dkro|j�qg|dkr�|j�qg|dkr�|j�qg|d dkr�|jt|�d	�qg||jkr�j	|�qg||j
kr	|j|�qg||jkr(|j|�qg|rgt
|d
�qgn&t|t�rZ|�n
t
|d
�|jjd�dS(NRR}tkeywordstsymbolsttopicsR�ismodules isHelp on %s:s
(R�RR~tlistkeywordstlistsymbolst
listtopicstlistmodulesRR�t
showsymbolR�t	showtopicR�R'RnR�RxR�(RR�((s/sys/lib/python2.7/pydoc.pyR}s4






cCs,|jjdttjd gd��dS(Ns�
Welcome to Python %s!  This is the online help utility.

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://docs.python.org/%s/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics".  Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given word
such as "spam", type "modules spam".
ii(RxR�ttupleRR�(R((s/sys/lib/python2.7/pydoc.pyR~-s	iiPc		Cs�|}|j�||}t|�|d|}x�t|�D]�}x�t|�D]z}|||}|t|�krS|jj||�||dkr�|jjdd|dt||��q�qSqSW|jjd�q@WdS(NiR�s
(R;R&R�RxR�(	RtitemstcolumnsR�tcolwR�trowR�R�((s/sys/lib/python2.7/pydoc.pyR�>s

4cCs*|jjd�|j|jj��dS(NsN
Here is a list of the Python keywords.  Enter any keyword to get more help.

(RxR�R�R�RF(R((s/sys/lib/python2.7/pydoc.pyR�Ls	cCs*|jjd�|j|jj��dS(Nsx
Here is a list of the punctuation symbols which Python assigns special meaning
to. Enter any symbol to get more help.

(RxR�R�R�RF(R((s/sys/lib/python2.7/pydoc.pyR�Ss	cCs*|jjd�|j|jj��dS(NsN
Here is a list of available topics.  Enter any topic name to get more help.

(RxR�R�R�RF(R((s/sys/lib/python2.7/pydoc.pyR�[s	cCs�yddl}Wn"tk
r4|jjd�dSX|jj||jj|��}|sz|jjdt|��dSt|�td�kr�|j	||�S|\}}y|jj|}Wn,t
k
r�|jjdt|��dSXtt|�d�|r"|pdd|}n|r�ddl
}ddl}	|j
�}
|	j|
�jdtt|�d�d�|jjd	|
j��ndS(
Ni�st
Sorry, topic and keyword documentation is not available because the
module "pydoc_data.topics" could not be found.
sno documentation found for %s
Rs
R�sRelated help topics: s, s
%s
(tpydoc_data.topicsR�RxR�R�R�R�R�R�R�tKeyErrorR�RtStringIOt	formattert
DumbWritertsend_flowing_dataRRtgetvalue(Rttopict
more_xrefst
pydoc_datattargettlabeltxrefsR'R�R�tbuffer((s/sys/lib/python2.7/pydoc.pyR�bs6
	!
cCs9|j|}|jd�\}}}|j||�dS(NR�(R�t	partitionR�(RtsymbolR�R�RZR�((s/sys/lib/python2.7/pydoc.pyR��s
cs�|r#|jjd�t|�nj|jjd�i}|d���fd�}t�j�d|�|j|j��|jjd�dS(NsO
Here is a list of matching modules.  Enter any module name to get more help.

sI
Please wait a moment while I gather a list of all available modules...

cSsM|r'|ddkr'|d d}nt|d�dkrId||<ndS(Ni�s	.__init__s
 (package)Rii(R(RR*R�R�((s/sys/lib/python2.7/pydoc.pytcallback�scs�d|d�dS(N(R_(R*(R�(s/sys/lib/python2.7/pydoc.pytonerror�sR�s�
Enter any module name to get more help.  Or, type "modules spam" to search
for modules whose descriptions contain the word "spam".
(RxR�tapropost
ModuleScannertrunR�RF(RRJR�R�((R�s/sys/lib/python2.7/pydoc.pyR��s	
		(sassertR(R�s	while for(R�sCLASSES SPECIALMETHODS(R�s	while for(R�R(R�R�(R�s	while for(sexecR(R�sbreak continue while(R�R�(R�R�(R�R�(sinR�(slambdas	FUNCTIONS(R�R(sprintR(R�R�(R�s	FUNCTIONS(R�R�(R�sbreak continue if TRUTHVALUE(R�s CONTEXTMANAGERS EXCEPTIONS yield(R�R(R�s'''sr'su's"""Rsr"su"(R�RZRs**R�s//Rs<<s>>R�RRRR�R�s<=s>=s==s!=s<>(R�R�s<=s>=s==s!=s<>(RZR(s+=s-=s*=s/=s%=s&=s|=s^=s<<=s>>=s**=s//=(s<<s>>R�RRR(R	R
(stypessRSTRINGS UNICODE NUMBERS SEQUENCES MAPPINGS FUNCTIONS CLASSES MODULES FILES inspect(Rs4str UNICODE SEQUENCES STRINGMETHODS FORMATTING TYPES(sstring-methodssSTRINGS FORMATTING(RR(Rs:encodings unicode SEQUENCES STRINGMETHODS FORMATTING TYPES(RsINTEGER FLOAT COMPLEX TYPES(Rs	int range(R s
float math(R"s
complex cmath(R#s%STRINGMETHODS FORMATTING xrange LISTS(R's	def TYPES(R(sclass def CLASSES TYPES(sbltin-code-objectsscompile FUNCTIONS TYPES(sbltin-type-objectsstypes TYPES(sbltin-null-objectR(sbltin-ellipsis-objectR/(sbltin-file-objectsR(R1R(stypess!class SPECIALMETHODS PRIVATENAMES(R3R�(soperator-summarys�lambda or and not in is BOOLEAN COMPARISON BITWISE SHIFTING BINARY FORMATTING POWER UNARY ATTRIBUTES SUBSCRIPTS SLICINGS CALLS TUPLES LISTS DICTIONARIES BACKQUOTES(R7R(R9stBASICMETHODS ATTRIBUTEMETHODS CALLABLEMETHODS SEQUENCEMETHODS1 MAPPINGMETHODS SEQUENCEMETHODS2 NUMBERMETHODS CLASSES(R;s cmp hash repr str SPECIALMETHODS(sattribute-accesssATTRIBUTES SPECIALMETHODS(scallable-typessCALLS SPECIALMETHODS(ssequence-typess)SEQUENCES SEQUENCEMETHODS2 SPECIALMETHODS(ssequence-methodss)SEQUENCES SEQUENCEMETHODS1 SPECIALMETHODS(ssequence-typessMAPPINGS SPECIALMETHODS(s
numeric-typess*NUMBERS AUGMENTEDASSIGNMENT SPECIALMETHODS(RAs%NAMESPACES DYNAMICFEATURES EXCEPTIONS(RCs*global ASSIGNMENT DELETION DYNAMICFEATURES(sdynamic-featuresR(s
exceptionsstry except finally raise(scoercion-rulesRG(RIRH(RJskeywords SPECIALIDENTIFIERS(s
id-classesR(satom-identifiersR(s
atom-literalssHSTRINGS BACKQUOTES NUMBERS TUPLELITERALS LISTLITERALS DICTIONARYLITERALS(ROsTUPLES LITERALS(stypesseq-mutableRQ(RSsLISTS LITERALS(RTRU(sdictsDICTIONARIES LITERALS(sstring-conversionssrepr str STRINGS LITERALS(sattribute-referencess(getattr hasattr setattr ATTRIBUTEMETHODS(RWR>(RYR�(RZR5(R\R5(R]R5(R^R5(R`R5(RbR5(RcsEXPRESSIONS BASICMETHODS(RdsEXPRESSIONS TRUTHVALUE(RfR(RhR@(Rnsfor while break continue(Rps if while and or not BASICMETHODS(RqRr(scontext-managersR�N(RRR�t_symbols_inverseR�t	iteritemsR�tsymbols_R�R�R�R_RtR�RwRxR{R$R|RXRR�R}R~R�R�R�R�R�R�R�(((s/sys/lib/python2.7/pydoc.pyR�:s@





		
								 	tScannercBs eZdZd�Zd�ZRS(sA generic tree iterator.cCs)||_g|_||_||_dS(N(trootststatetchildrentdescendp(RR�R�R�((s/sys/lib/python2.7/pydoc.pyRt�s
		cCs�|jsF|jsdS|jjd�}||j|�fg|_n|jd\}}|sv|jj�|j�S|jd�}|j|�r�|jj||j|�f�n|S(Nii�(R�R�R_RR�tnextR�R(RtroottnodeR�tchild((s/sys/lib/python2.7/pydoc.pyR��s		

"(RRRTRtR�(((s/sys/lib/python2.7/pydoc.pyR��s	R�cBs eZdZdddd�ZRS(s7An interruptible scanner that searches module synopses.cCs|rt|�}nt|_i}x�tjD]�}|dkr.d||<|dkri|d|d�q�tt|�jp~dd�d}t	t|d|�|�dkr�|d||�q�q.q.Wx7t
jd|�D]#\}}}	|jr�|dkr|d|d�q�|j|�}
t
|
d�r�d	dl}t|j|
j|���pad}t
|
d
�r�|
j|�}q�d}n:|
j|�}
|
jp�dj�d}t|
dd�}t	t|d|�|�dkr�||||�q�q�W|r|�ndS(Nt__main__iRs
is - R�t
get_sourcei�tget_filenameRU(RRwR�RR�R_RR�RTRR9R�tfind_moduleR^R�R~R�R�R�R�RG(RR�RJt	completerR�tseenR*R�RGRHtloaderR�RR�((s/sys/lib/python2.7/pydoc.pyR��sB	
"#"		#N(RRRTR_R�(((s/sys/lib/python2.7/pydoc.pyR��sc	CsOd�}d�}tj��tjd�t�j||d|�WdQXdS(sAPrint all the one-line module summaries that contain a substring.cSs8|ddkr!|d d}n|G|o2d|GHdS(Ni�s	.__init__s
 (package)s- ((RR*R�((s/sys/lib/python2.7/pydoc.pyR��scSsdS(N((R*((s/sys/lib/python2.7/pydoc.pyR��stignoreR�N(twarningstcatch_warningstfilterwarningsR�R�(RJR�R�((s/sys/lib/python2.7/pydoc.pyR��s
		

c	Cs�ddl}ddl}ddl}d|jfd��Y}d|jfd��Y}d|jfd��Y}|j|_||_||_z8y|||�j	�Wnt
|jfk
r�nXWd|r�|�nXdS(Ni�tMessagecBseZdd�ZRS(icSsf|j}|jdjdj|||�|jd�|_|jd�|_|j�|j�dS(Niscontent-transfer-encodingscontent-type(R�RCRtt	getheadertencodingheadert
typeheadert	parsetypet
parseplist(RtfptseekableR�((s/sys/lib/python2.7/pydoc.pyRt�s	!
(RRRt(((s/sys/lib/python2.7/pydoc.pyR��st
DocHandlercBs#eZd�Zd�Zd�ZRS(cSs_yG|jd�|jdd�|j�|jjtj||��Wntk
rZnXdS(Ni�sContent-Types	text/html(t
send_responsetsend_headertend_headerstwfileR�R�R�R�(RR�R�((s/sys/lib/python2.7/pydoc.pyt
send_documents

 
cSs�|j}|ddkr&|d }n|d dkrC|d}n|r�dkr�t|dd�}Wn3tk
r�}|j|tjt|���dSX|r�|jt|�tj||��q�|j|dt	|��n�tj
dd	d
�}d�}td�tj
�}tj||�}d
tjdd	d|�g}i}	x*tjD]}
|jtj|
|	��q]W|t|�d}|jd|�dS(Ni�s.htmliR�RR�s$no Python documentation found for %ss?<big><big><strong>Python: Index of Modules</strong></big></big>s#ffffffs#7799eecSsd||fS(Ns<a href="%s.html">%s</a>((R+((s/sys/lib/python2.7/pydoc.pyt	bltinlinkscSs
|dkS(NR�((RQ((s/sys/lib/python2.7/pydoc.pyR(!ss<p>sBuilt-in Moduless#ee77aas�<p align=right>
<font color="#909090" face="helvetica, arial"><strong>
pydoc</strong> by Ka-Ping Yee &lt;ping@lfw.org&gt;</font>sIndex of Modules(RR�R�R�R�R�RrR�R�R�R�RbRR�R�R�RR|R(RRR@RKR�R�tnamesR�tindicesR�R((s/sys/lib/python2.7/pydoc.pytdo_GETs<	

%				
cWsdS(N((RR�((s/sys/lib/python2.7/pydoc.pytlog_message/s(RRR�R�R�(((s/sys/lib/python2.7/pydoc.pyR�s		#t	DocServercBs#eZd�Zd�Zd�ZRS(cSsQd}||f|_d||f|_||_|jj||j|j�dS(Nt	localhosts
http://%s:%d/(taddressRR�RLRtthandler(RtportR�thost((s/sys/lib/python2.7/pydoc.pyRt2s
	cSsiddl}t|_xM|jsd|j|jj�gggd�\}}}|r|j�qqWdS(Ni�i(tselectRwR�tsocketR�thandle_request(RR�trdtwrtex((s/sys/lib/python2.7/pydoc.pytserve_until_quit9s	-cSs-|jj|�|jr)|j|�ndS(N(RLtserver_activateR�(R((s/sys/lib/python2.7/pydoc.pyR�@s	(RRRtR�R�(((s/sys/lib/python2.7/pydoc.pyR�1s		(tBaseHTTPServert	mimetoolsR�R�tBaseHTTPRequestHandlert
HTTPServerRLR�tMessageClassR�R�terror(	R�R�R�R�R�R�R�R�R�((s/sys/lib/python2.7/pydoc.pytserve�s$	.		cCsoddd��Y}ddl}y8|j�}z||�}|j�Wd|j�XWntk
rjnXdS(sEGraphical interface (starts web server and pops up a control window).tGUIcBs�eZdd�Zd�Zddd�Zdd�Zdd�Zd�Zdd�Z	d�Z
dd	�Zdd
�Zd�Z
d�Zdd
�ZRS(i(c
Ss�||_d|_d|_ddl}|j|�|_|j|jdd�|_|j	|jddd|j
dd�|_|j	|jddd|jdd�|_
|j|�|_|j|jdd	�|_|j|j�|_|jjd
|j�|j	|jdddd
d|jdd�|_tjdkrU|jjdd�n|jjd�|jjd|j�|jjdddd�|jjdddddd�|j
jdddddd�|jjdddd�|jjdd�|jjdddddd�|jjdddd�|jj�dtjdkr[dp^df}|j|d|dd�|_|jjd|j�|jjd |j�|j |d!d"d|jj!�|_"|jj#d#|j"j$�|j|�|_%|j	|j%dd$d|j�|_&|j	|j%dd%d|j'�|_(|j&jdddddd�|j(jdddddd�|jj)�|jj*�|_+|jj,�|_-|jj.�|jj.�|jj.�|j%j.�|_/|j+|j/|_0|_1d
|_2|jj3d&|j+|j-f�|jj4|j+|j-�|jj5j6�ddl7}|j8d't9d(||j:|jf�j;�dS()Ni�R4sStarting server...
 sopen browsertcommandR�tdisabledsquit servings
Search fors<Return>tstoptpadyiR#tsidetrighttpydoctWM_DELETE_WINDOWttoptfillRQtlefttexpandit	helveticaii
tfonttheightis
<Button-1>s<Double-Button-1>torienttverticaltyscrollcommandsgo to selectedshide resultss%dx%dR�R�(<twindowR_tservertscannertTkintertFramet
server_frmtLabelt	title_lbltButtonR�topen_btnR�tquit_btnt
search_frmt
search_lbltEntryt
search_enttbindR
R�tstop_btnRR2tpackR�tprotocolt	focus_settListboxt
result_lstR�tgotot	Scrollbartyviewt
result_scrtconfigR�t
result_frmtgoto_btnthidethide_btnRDtwinfo_widthtminwidthtwinfo_heightt	minheighttwinfo_reqheighttbigminheighttbigwidtht	bigheighttexpandedtwm_geometryt
wm_minsizettktwilldispatcht	threadingtThreadR�treadyR(RR�R�R�R�R(((s/sys/lib/python2.7/pydoc.pyRtTsp			!
!
&	 	cSsM||_|jjdd|j�|jjdd�|jjdd�dS(NR4sPython documentation server at
R�tnormal(R�RRRRR(RR�((s/sys/lib/python2.7/pydoc.pyR*�s
	cSs�|p|jj}yddl}|j|�Wnatk
r�tjdkrbtjd|�q�tjd|�}|r�tjd|�q�nXdS(Ni�R#s
start "%s"s netscape -remote "openURL(%s)" &snetscape "%s" &(	R�Rt
webbrowserR�R�RR2RR�(RteventRR,trc((s/sys/lib/python2.7/pydoc.pyR��s
cSs)|jrd|j_n|jj�dS(Ni(R�R�R�(RR-((s/sys/lib/python2.7/pydoc.pyR��s	cSs|jj�}|jjdd�|jjdd�|jjdd|�|jj�|jjdd�|jjdd	�|j	jdd
�|j
�ddl}|jr�d|j_
nt�|_|jd
|jjd|j||jf�j�dS(NR�R�R�R+R4sSearching for "%s"...R�iRR�i�iR�R�(R
R�RR
RRtforgetRtdeleteRR�R(R�R�R�R)R�RDR�R(RR-RJR(((s/sys/lib/python2.7/pydoc.pyR
�s

	cSsF|ddkr!|d d}n|jjd|d|p=d�dS(Ni�s	.__init__s
 (package)Rs - s(no description)(Rtinsert(RRR*R�((s/sys/lib/python2.7/pydoc.pyRD�scSs%|jr!d|j_d|_ndS(Ni(R�R�R_(RR-((s/sys/lib/python2.7/pydoc.pyR��s	cSs�d|_|jjdd�|jjdd�|jjdddddd	�tjd
krm|jj	�n|jjdd�dS(
NR4s
Search forR�R�R�R�RQR�iR#R�R�(
R_R�RRR
R
RR2RR/(R((s/sys/lib/python2.7/pydoc.pyR��s	cSs|jjdd�dS(NR�R+(RR(RR-((s/sys/lib/python2.7/pydoc.pyR��scSsZ|jj�}|rVt|jj|d��d}|jd|jj|d�ndS(NiRs.html(RtcurselectionRR�R�R�R(RR-t	selectionR*((s/sys/lib/python2.7/pydoc.pyR�s cSs�|js
dS|jj�|jj�|jj�|jj�|_|jj�|_	|jj
d|j|jf�|jj
|j|j�d|_dS(Ns%dx%di(R#RR/RRR�RR!RR"R$RRR%(R((s/sys/lib/python2.7/pydoc.pytcollapse�s	


 cSs�|jr
dS|jjdddd�|jjdddd�|jjddddd	d
�|jjd|j|jf�|jj	|j
|j�d
|_dS(NR�tbottomR�RQR�tyR�tbothR�is%dx%d(R#RR
RRR�R$R!R"R%RR (R((s/sys/lib/python2.7/pydoc.pyR��s	 cSs|j�|j�dS(N(R�R4(RR-((s/sys/lib/python2.7/pydoc.pyR�s
N(RRRtR*R_R�R�R
RDR�R�R�RR4R�R(((s/sys/lib/python2.7/pydoc.pyR�SsE						i�N((R�tTktmainlooptdestroyR�(R�R�R�tgui((s/sys/lib/python2.7/pydoc.pyR;Qs�
cCs%t|t�o$t|tj�dkS(Ni(RnRrRRtsep(RQ((s/sys/lib/python2.7/pydoc.pytispath	scCs�ddl}ddd��Y}dtjkrtjjtjd�}|tjkritjj|�ntjjdd�ny�|jtjdd	�\}}d}x�|D]�\}}|d
kr�t�dS|dkr�	|�dS|dkrGyt
|�}Wntk
r |�nXd
�}	d�}
t||	|
�dS|dkr�d}q�q�W|so|�nx�|D]�}t
|�r�tjj|�r�d|GHPny|t
|�r�tjj|�r�t|�}n|rt
|�r	tjj|�r	t|�q#t|�n
tj|�Wqvtk
r>}|GHqvXqvWWnW|j|fk
r�tjjtjd�}
d|
tj|
|
|
|
tjfGHnXdS(s@Command-line interface (looks at sys.argv to decide what to do).i�NtBadUsagecBseZRS((RR(((s/sys/lib/python2.7/pydoc.pyR>	sRiRisgk:p:ws-gs-ks-pcSsd|jGHdS(Nspydoc server ready at %s(R(R�((s/sys/lib/python2.7/pydoc.pyR*(	scSs	dGHdS(Nspydoc server stopped((((s/sys/lib/python2.7/pydoc.pytstopped*	ss-wsfile %r does not exists�pydoc - the Python documentation tool

%s <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 '%s', it is used as the path to a
    Python source file to document. If name is 'keywords', 'topics',
    or 'modules', a listing of these things is displayed.

%s -k <keyword>
    Search for a keyword in the synopsis lines of all available modules.

%s -p <port>
    Start an HTTP server on the given port on the local machine.

%s -g
    Pop up a graphical interface for finding and serving documentation.

%s -w <name> ...
    Write out the HTML documentation for a module to a file in the current
    directory.  If <name> contains a '%s', it is treated as a filename; if
    it names a directory, documentation is written for all the contents.
((tgetoptRRRtdirnametargvtremoveR1R;R�R
t
ValueErrorR�R=texistsRuR�RR�R�R}R�R�R�R<(R@R>t	scriptdirtoptsR�twritingtopttvalR�R*R?targRKR�((s/sys/lib/python2.7/pydoc.pytcli	s^


		
	
	

R�(bRTR-R&R$R/RR�RR"R�RRcR9R�R�RtstringRRRRRRRRt	tracebackR	tcollectionsR
R�R�RRR)R,R3R6R;R	t
IGNORECASER<R=RARERRR_RbRiRoRjt	NameErrorR$RqR!tlocaletgetpreferredencodingRsRyR~R�RNR�R�R�R�R�R�R~RR�R�R�R�R�R�R�R�R�R4R�R�R�R�R�R�R'R�R�R�R}R�R�R�R�R;R=RLR(((s/sys/lib/python2.7/pydoc.pyt<module>#s�
l:
											
		

					28*�% �	!					&				�,	[	�	S

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.