Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /opt/alt/python311/lib64/python3.11/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python311/lib64/python3.11/__pycache__/pydoc.cpython-311.opt-1.pyc
�

�,d1�����dZdgZdZdZdZddlZddlZddlZddl	Zddl
ZddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlmZddlmZdd	lmZd
�Zd�Z d�Z!d
�Z"d�Z#d�Z$d�Z%d�Z&d�Z'd�Z(d�Z)ej*dej+��Z,d�Z-d�Z.d�Z/d�Z0e1ej2��Z3dRd�Z4d�Z5d�Z6d�Z7d�Z8ifd�Z9Gd �d!e:��Z;d"�Z<difd#�Z=Gd$�d%��Z>Gd&�d'e��Z?Gd(�d)e>��Z@Gd*�d+e��ZAGd,�d-e>��ZBGd.�d/eB��ZCd0�aDd1�ZEd2�ZFd3�ZGd4�ZHd5�ZId6�ZJd7�ZKd8�ZLdSd9�ZMeB��ZNeC��ZOe@��ZPdSd:�ZQ		dTd<�ZR		dTd=�ZSdSd>�ZTdUd@�ZUGdA�dB��ZVeV��ZWGdC�dD��ZXdE�ZYdF�ZZdVdH�Z[dSdIdJdK�dL�Z\dM�Z]dN�Z^dO�Z_dP�Z`eadQkre`��dSdS)WaGenerate 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 2001z�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.
�N)�deque)�Repr)�format_exception_onlyc�F�g}g}tjD]�}tj�|pd��}tj�|��}||vrItj�|��r*|�|��|�|����|S)zAConvert sys.path into a list of absolute, existing, unique paths.�.)�sys�path�os�abspath�normcase�isdir�append)�dirs�normdirs�dir�normdirs    �,/opt/alt/python311/lib64/python3.11/pydoc.py�pathdirsrRs���
�D��H��x�%�%���g�o�o�c�j�S�)�)���'�"�"�3�'�'���(�"�"�r�w�}�}�S�'9�'9�"��K�K������O�O�G�$�$�$���K�c���tj�|j��}|�dS|j�d��dd�D]}t
||��}�tj|��sdS|S)Nr���)	r	�modules�get�
__module__�__qualname__�split�getattr�inspect�isclass)�func�cls�names   r�
_findclassr$^sw��

�+�/�/�$�/�
*�
*�C�
�{��t��!�'�'��,�,�S�b�S�1�!�!���c�4� � ����?�3�����t��Jrc�J�tj|��rZ|jj}|j}tj|��r*t
t
||d��d��|jur|}�n~|j}�nutj|��r.|j}t|��}|�t
||��|urdS�n3tj
|��rC|j}|j}tj|��r|jdz|z|jkr|}n�|j}n�t|t��r4|j}|j}t|��}|�t
||��|urdSn�tj|��stj|��ri|j}|j}t
||��|urdStj|��r2t
|dd��}t|t&��r||vr||SndS|jD]7}	t+t
||����}n#t,$rY�-wxYw|�|cS�8dS)N�__func__r�	__slots__)r�ismethodr&�__name__�__self__r r�	__class__�
isfunctionr$�	isbuiltinr�
isinstance�property�fget�ismethoddescriptor�isdatadescriptor�__objclass__�ismemberdescriptor�dict�__mro__�
_getowndoc�AttributeError)�objr#�selfr"r!�slots�base�docs        r�_finddocr>hsd�������(��|�$���|���O�D�!�!�	!��G�D�$��-�-�z�:�:�c�l�J�J��C�C��.�C�C�	�	�C�	 �	 ���|����o�o���;�'�#�t�,�,�C�7�7��4�8�	�	�3�	�	���|���|���O�D�!�!�	!����#�d�*�c�.>�>�>��C�C��.�C�C�	�C��	"�	"���x���}��������;�'�#�t�,�,�C�7�7��4�8�	�	#�C�	(�	(�
�G�,D�S�,I�,I�
��|������3����S�(�(��4��%�c�*�*�	#��C��d�3�3�E��%��&�&�
#�4�5�=�=��T�{�"���t������	��W�T�4�0�0�1�1�C�C���	�	�	��H�	�����?��J�J�J���4s�.H�
H�Hc���	t�|d��}|�dS|tur1t|��j}t	|t
��r||krdS|S#t$rYdSwxYw)zUGet the documentation string for an object if it is not
    inherited from its class.�__doc__N)�object�__getattribute__�typer@r.�strr8)r9r=�typedocs   rr7r7�s���
��%�%�c�9�5�5���;��4��d�?�?��3�i�i�'�G��'�3�'�'�
�G�s�N�N��t��
�������t�t����s�A�8A�A�
A+�*A+c���t|��}|�)	t|��}n#ttf$rYdSwxYwt	|t
��sdSt
j|��S)z�Get 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.rDr�cleandoc)rAr=s  r�_getdocrI�sy���V�
�
�C�
�{�	��6�"�"�C�C���	�*�	�	�	��4�4�	�����c�3�����t���C� � � s�#�8�8c��t|��ptj|��}|r(tjdd|�����pdS)z-Get the doc string or comments for an object.z^ *
�)rIr�getcomments�re�sub�rstrip)rA�results  r�getdocrQ�sC��
�V�_�_�
;�� 3�F� ;� ;�F��:�b�f�W�b�&�-�-�/�/�:�:�@�b�@rc�\�|����d��}t|��dkr
|ddfSt|��dkr?|d���s%|dd�|dd���fSdd�|��fS)z>Split a doc string into a synopsis line (if any) and the rest.�
�rrK�N)�stripr�lenrO�join)r=�liness  r�splitdocrZ�s����I�I�K�K���d�#�#�E�
�5�z�z�Q����Q�x��|��	�U���q����q����!2�!2���Q�x����5����9�-�-�-�-�
�t�y�y�����rc�D�|j}|j|kr
|jdz|z}|S)z@Get a class name and qualify it with a module name if necessary.r)r)r)rA�modnamer#s   r�	classnamer]�s.���?�D�
��G�#�#�� �3�&��-���Krc���tj|��pctj|��pOtj|��p;tj|��p'tj|��ptj|��S)z>Check if an object is of a type that probably means it's data.)r�ismoduler �	isroutine�isframe�istraceback�iscode)rAs r�isdatard�s|��� ��(�(�F�G�O�F�,C�,C�F��!�&�)�)�F�-4�_�V�-D�-D�F��#�F�+�+�F�/6�~�f�/E�/E�G�Grc��|r@|d�|�|d����}|dd�}|�@|S)z/Do a series of global replacements on a string.rTrrUN)rXr)�text�pairss  r�replacerh�sM��
���Q�x�}�}�T�Z�Z��a��1�1�2�2���a�b�b�	�����Krc���t|��|krTtd|dz
dz��}td|dz
|z
��}|d|�dz|t|��|z
d�zS|S)zCOmit part of a string if needed to make it fit in a maximum length.r�rUN�...)rW�max)rf�maxlen�pre�posts    r�cramrp�sq��
�4�y�y�6����!�f�Q�h��]�#�#���1�f�Q�h�s�l�#�#���D�S�D�z�E�!�D��T���4����$9�9�9��Krz at 0x[0-9a-f]{6,16}(>+)$c�8�t�d|��S)z>Remove the hexadecimal id from a Python object representation.z\1)�_re_stripidrN�rfs r�stripidrt�s���?�?�5�$�'�'�'rc��tj|��rdStj|��r*t|dd��}tj|��p|duSdS)zo
    Returns True if fn is a bound method, regardless of whether
    fn was implemented in Python or in C.
    Tr*NF)rr(r-rr_)�fnr:s  r�_is_bound_methodrw�sb��
�������t������>��r�:�t�,�,���$�T�*�*�<�t�t�|�=�=��5rc�
�i}tj|tj��D]
\}}d||<�|jD]$}|�t|�����%|���D]}t||��||<�|S�NrT)r�
getmembersr`�	__bases__�update�
allmethods�keysr)�cl�methods�key�valuer<s     rr}r}�s����G��(��W�->�?�?���
��U��������)�)�����z�$�'�'�(�(�(�(��|�|�~�~�(�(���r�3�'�'������Nrc��g}g}|D]8}||��r|�|���#|�|���9||fS)z�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)�s�	predicate�yes�no�xs     r�_split_listr�sX��
�C�	�B�
�����9�Q�<�<�	��J�J�q�M�M�M�M��I�I�a�L�L�L�L���7�Nrc�f�|dvrdS|�d��r|�d��rdS|�d��rt|d��rdS|tur4|tvr+tt
||d��tj��rd	S|�||vS|�d��S)
z3Decide whether to show documentation on a variable.>r@�__date__�__file__r)�__path__�__spec__r'�
__author__�
__cached__�
__loader__r�__credits__�__package__�__version__�__builtins__rr�__rT�_�_fieldsTNF)�
startswith�endswith�hasattr�
__future__�_future_feature_namesr.r�_Feature)r#�allr9s   r�visiblenamer�s����H�H�H��q����t���>����t�!4�!4�>�Q�Q����s������Y� 7� 7���t�
�*����)>�!>�!>��g�c�4��.�.�
�0C�D�D�	��5�
���s�{���?�?�3�'�'�'�'rc���g}tj|��D]T\}}}}tj|��r d}t|t��r	|j�d}|�||||f���U|S)zCWrap inspect.classify_class_attrs, with fixup for data descriptors.�data descriptorN�readonly property)r�classify_class_attrsr2r.r/�fsetr)rA�resultsr#�kindr"r�s      rr�r�,s����G�$+�$@��$H�$H�1�1� ��t�S�%��#�E�*�*�	+�$�D��%��*�*�
+�u�z�/A�*������d�C��/�0�0�0�0��Nrc����t|dg���	�fd�t���D���n#t$ri�YnwxYw�fd�}|�|���dS)zGSort the attrs list in-place by _fields and then alphabetically by namer�c�<��i|]\}}||t���z
��S�)rW)�.0�ir#�fieldss   �r�
<dictcomp>z#sort_attributes.<locals>.<dictcomp>=s)���O�O�O�	��D�t�a��F���m�O�O�Orc�L����|dd��|dfS�Nr)r)�attr�field_orders �r�<lambda>z!sort_attributes.<locals>.<lambda>@s"���K�O�O�D��G�Q�7�7��a��A�r�r�N)r�	enumeraterG�sort)�attrsrA�keyfuncr�r�s   @@r�sort_attributesr�7s������V�Y��
+�
+�F��O�O�O�O�Y�v�=N�=N�O�O�O����������������A�A�A�A�G�	�J�J�7�J�����s�1�A�Ac���tj�|��rHdD]E}tj�tj�|d|z����rdS�FdS)z3Guess whether a path refers to a package directory.)z.pyz.pyc�__init__TF)rr
r�isfilerX)r
�exts  r�	ispackager�Esc��	�w�}�}�T����"�	�	�C��w�~�~�b�g�l�l�4��c�1A�B�B�C�C�
��t�t�
��5rc�z�|���}|dd�dks|���s9|���}|sn"|dd�dk�%|����9|���}|dd�dkr
|dd�}|dd�dkr�|dd�}|dd�dkr
|dd�}|���s+|���}|sn|����+|�d��d	���}nd}|S)
NrT�#�zr"""rj�"""r�\r)�readlinerVr)�file�linerPs   r�source_synopsisr�Ms4���=�=�?�?�D�
�r��r�(�c�/�/������/��}�}������U��r��r�(�c�/�/������/��:�:�<�<�D��B�Q�B�x�6���$�q�r�r�(�4��B�Q�B�x�5����A�B�B�x������9����T�#�2�#�Y�d��*�*�,�,�	��=�=�?�?�D�����*�*�,�,�	����E�"�"�1�%�+�+�-�-����&��Mrc�X�tj|��j}|�|d��\}}|�||k�rn|�ttjj����rtjj	}nE|�ttjj
����rtjj}nd}|�Q	tj
|��}n#t$rYdSwxYw|5t|��}ddd��n#1swxYwYn�|d|��}tj�d||���}	tj�|��}	n#YdSxYwt(jd=|	jr|	j���dnd}||f||<|S)z.Get the one-line summary out of a module file.�NNN�__temp__��loaderr)r�stat�st_mtimerr��tuple�	importlib�	machinery�BYTECODE_SUFFIXES�SourcelessFileLoader�EXTENSION_SUFFIXES�ExtensionFileLoader�tokenize�open�OSErrorr��util�spec_from_file_location�
_bootstrap�_loadr	rr@�
splitlines)
�filename�cache�mtime�
lastupdaterP�
loader_clsr�r��spec�modules
          r�synopsisr�^s����G�H���&�E����8�\�:�:��J����Z�%�/�/����U�9�#6�#H�I�I�J�J�	�"�,�A�J�J�
�
�
�u�Y�%8�%K�L�L�
M�
M�	�"�,�@�J�J��J���
��}�X�.�.�����
�
�
��t�t�
�����
/�
/�(��.�.��
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/����
/�
/�
/�
/�� �Z�
�H�5�5�F��>�9�9�*�h�AG�:�I�I�D�
�"�-�3�3�D�9�9����
��t�t������J�'�7=�~�O�V�^�.�.�0�0��3�3�4�F� �&�/��h���Ms0�C�
C*�)C*�/D�D�D�E&�&E+c��eZdZdZd�Zd�ZdS)�ErrorDuringImportzEErrors that occurred while trying to import something to document it.c�>�||_|\|_|_|_dS�N)r��excr��tb)r:r��exc_infos   rr�zErrorDuringImport.__init__�s�� ��
�(0�%���$�*�d�g�g�grc�D�|jj}d|j�d|�d|j��S)Nzproblem in � - z: )r�r)r�r�)r:r�s  r�__str__zErrorDuringImport.__str__�s)���h����+/�=�=�=�#�#�#�t�z�z�J�JrN)r)rrr@r�r�r�rrr�r��s=������O�O�1�1�1�K�K�K�K�Krr�c��tjj}t|d��5}||�t|����k}ddd��n#1swxYwYtj�|��}tj�	|��\}}|r!tj
�||��}n tj
�||��}tj�
|||���}	tj�|��S#t!|t#j�����xYw)z<Import a Python source file or compiled file given its path.�rbNr�)r�r��MAGIC_NUMBERr��readrWrr
�basename�splitext�_bootstrap_externalr��SourceFileLoaderr�r�r�r�r	r�)	r
�magicr��is_bytecoder�r#r�r�r�s	         r�
importfiler��sJ���N�'�E�	
�d�D�	�	�5�T��t�y�y��U���4�4�4��5�5�5�5�5�5�5�5�5�5�5����5�5�5�5��w����%�%�H��� � ��*�*�I�D�#��L��.�C�C�D�$�O�O����.�?�?��d�K�K���>�1�1�$��V�1�L�L�D�6��#�)�)�$�/�/�/��6���c�l�n�n�5�5�5���s�'A�A�A�D&�&#E	c����	|r_�tjvrQ�tjvrC�fd�tjD��}�g|zD]$}tj|||<tj|=�%t���}n�#tj��x\}}}}	�tjvr%ttj�j|	���|turt|j|	���t|t��r|j�krYdSt�tj�����xYw��d��dd�D]$}
t||
��}�#t$rYdSwxYw|S)a�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).c�D��g|]}|��dz���|��S)r)r�)r��mr
s  �r�
<listcomp>zsafeimport.<locals>.<listcomp>�s.���K�K�K�a�!�,�,�t�c�z�2J�2J�K��K�K�KrNrrT)r	r�builtin_module_names�
__import__r�r�r��SyntaxErrorr��
issubclass�ImportErrorr#rrr8)r
�	forceloadr��subsr�r�r�r�r��info�parts`          r�
safeimportr	�s��� :�
�	)����,�,��3�3�3�3�L�K�K�K�3�;�K�K�K�� �6�D�=�)�)�C�!$��S�!1�E�#�J���C�(�(��D�!�!����:�"%�,�.�.�0���e�R�4��3�;���#�C�K��$5�$>��E�E�E�
�K�
�
�#�E�N�D�9�9�9�
��[�
)�
)�	:�e�j�D�.@�.@��4�4�$�D�#�,�.�.�9�9�9�����
�
�3������#�+�+���f�d�+�+�V�V���*�*�*�d�d�d�d�*�����Ms%�A0A4�4BD$�!D$�E�
E&�%E&c��eZdZej�ddejdd�z��Zd	d�Z	d	d�Z
e
xZxZxZ
xZxZZejd��fd�ZdS)
�Doc�
PYTHONDOCSz%https://docs.python.org/%d.%d/libraryNrUc�8�||f|z}	tj|��r
|j|�Stj|��r
|j|�Stj|��r
|j|�Sn#t$rYnwxYwtj|��r
|j	|�S|j
|�S)z%Generate documentation for an object.)rr_�	docmoduler �docclassr`�
docroutiner8r2�docdata�docother)r:rAr#�argss    r�documentzDoc.document�s�����~��$��
	����'�'�E�����0E�)E���v�&�&�C�}�t�}�d�/C�(C�� ��(�(�G����$�1G�*G�G���	�	�	��D�	�����#�F�+�+�G�L�D�L�$�4G�-G��t�}�d�#�#s�A$�A$�A$�$
A1�0A1c�x�d|odt|��z�dt|��j��}t|���)z+Raise an exception for unimplemented types.z!don't know how to document object� z	 of type )�reprrCr)rG)r:rAr#r�messages     r�failzDoc.fail�sB���
�%�S�4��:�:�%�%�%�t�F�|�|�'<�'<�>���� � � r�stdlibc��	tj|��}n#t$rd}YnwxYwtj�d|j��}tj�|��}t|tt����r�|jdvsH|�|��r�|�tj�
|d����s�|jdvr�|�d��rAd�|�d��|j�����}n=tj�
||j���d	z��}nd
}|S)z*Return the location of module docs or None�
(built-in)r)
�errno�
exceptions�gc�imp�marshal�posix�signalr	�_thread�	zipimportz
site-packages)z	xml.etreeztest.pydoc_mod)zhttp://zhttps://z
{}/{}.html�/�.htmlN)r�
getabsfilerGr�environrrr
r
r.rCr)r�rX�formatrO�lower)r:rA�basedirr��doclocs     r�	getdoclocz
Doc.getdocloc�s`��	 ��%�f�-�-�D�D���	 �	 �	 ��D�D�D�	 ���������d�o�>�>���'�"�"�7�+�+���v�t�B�x�x�(�(�	�
�_�!9�9�9��o�o�g�&�&�9��/�/�"�'�,�,�w��"H�"H�I�I�	9�

�O�#B�B�B�� � �!8�9�9�
Q�%�,�,�V�]�]�3�-?�-?���AV�AV�AX�AX�Y�Y�������f�f�o�.C�.C�.E�.E��.O�P�P����F��
s��&�&r�)r)rrrr)rr	�version_inforrrrrrr�docpropertyr�	sysconfig�get_pathr.r�rrrr�s������������ G�"%�"2�2�A�2�"6�!7�8�8�J�$�$�$�$� !�!�!�!�LP�O�I�O��O�:�O��O�;��(:�	�(:�8�(D�(D������rrc�>�eZdZdZd�Zd�Zd�Zd�Zd�ZeZ	d�Z
eZdS)	�HTMLReprzBClass for safely making an HTML representation of a Python object.c�t�tj|��dx|_|_d|_dx|_|_dS�N��
�d�rr��maxlist�maxtuple�maxdict�	maxstring�maxother�r:s rr�zHTMLRepr.__init__
�9���
�d����')�)���t�}����),�,������rc	�,�t|dddddd��S)N�&z&amp;�<z&lt;�>z&gt;)rh�r:rfs  r�escapezHTMLRepr.escapes���t�S�'�3���V�D�D�Drc�,�tj||��Sr�)rr�r:rAs  rrz
HTMLRepr.reprs���y��v�&�&�&rc	��tt|��d��rfdd�t|��j�����z}t||��rt||��||��S|�ttt|����|j
����S�Nr)�repr_r�)r�rCrXr)rrrGrprtrr?�r:r��level�
methodnames    r�repr1zHTMLRepr.repr1s����4��7�7�J�'�'�	;� �3�8�8�D��G�G�,<�,B�,B�,D�,D�#E�#E�E�J��t�Z�(�(�
;�0�w�t�Z�0�0��E�:�:�:��{�{�4���Q��� 0� 0�$�-�@�@�A�A�Arc��t||j��}t|��}d|vr=dt|dd��vr*d|dz|�|��z|dzStjdd|�|����S)Nr��\\rK�rrz-((\\[\\abfnrtv\'"]|\\[0-9]..|\\x..|\\u....)+)z<span class="repr">\1</span>)rpr>rrhrGrMrN�r:r�rN�test�testreprs     r�repr_stringzHTMLRepr.repr_string s����A�t�~�&�&����:�:���4�<�<�D���%��(D�(D�D�D���!��$�t�{�{�4�'8�'8�8�8�A�;�F�F��v�F�5��k�k�(�+�+�-�-�	-rc	���	|�ttt|����|j����S#|�d|jjz��cYSxYw�Nz
<%s instance>)rGrprtrr>r+r)�r:r�rNs   r�
repr_instancezHTMLRepr.repr_instance-s`��	G��;�;�t�G�D��G�G�$4�$4�d�n�E�E�F�F�F��	G��;�;����1E�E�F�F�F�F�F���s�AA�$A*N)r)rrr@r�rGrrPrW�repr_strr[�repr_unicoder�rrr4r4s�������L�L�-�-�-�E�E�E�'�'�'�B�B�B�	-�	-�	-��H�G�G�G��L�L�Lrr4c��eZdZdZe��ZejZejZd�Zdd�Z			dd�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zdiiifd�Zdd�Zdd�Zddiifd�Zd�Zddiiidfd�Zdd�ZeZdd�Zdd�ZdS) �HTMLDocz'Formatter class for HTML documentation.c��d|�d|�d�S)�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:�title�contentss   r�pagezHTMLDoc.page>s����U�U�H�H�H�&�	&rrKc��d|�d|pd�d�S)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:rb�extrass   r�headingzHTMLDoc.headingJs$����5�5�&�$�H�$�$�&�	&r�Nrfc��|�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.Nz<span class="code">rfz</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:rbr"rc�width�prelude�
marginalia�gaprPs	         r�sectionzHTMLDoc.sectionSs�����.��E�1A�A�I�M�J��
�3�3����	��
�	N��V��c�c�:�:�:�s�s�s�G�G�G�S�S�S�:�:�F�F�
�V�8;���Z�Z�Z����N�N�F��I�H�T�T�Trc�(�d|z}|j|g|�R�S)z$Format a section with a big heading.z&<strong class="bigsection">%s</strong>)rp)r:rbrs   r�
bigsectionzHTMLDoc.bigsectionhs&��8�5�@���t�|�E�)�D�)�)�)�)rc�~�|�|�����}t|dddddddd�	�	S)z!Format literal preformatted text.�

z
 
rrfrS�<br>
)rG�
expandtabsrhrFs  r�	preformatzHTMLDoc.preformatmsB���{�{�4�?�?�,�,�-�-���t�V�W�f�g� �(�D�(�<�<�	<rc��d}t|��dzdz}td��D]R}|dz}t||z||z|z��D],}|t|��kr||||��zdz}�-|dz}�Sd|zS)z0Format a list of items into a multi-column list.rKrjr�z<td class="multicolumn">rurkz<table><tr>%s</tr></table>)rW�range)r:�listr*rP�rows�colr�s       r�multicolumnzHTMLDoc.multicolumnss������D�	�	�A�
�!�#����8�8�	&�	&�C��8�8�F��4��8�T�#�X�d�]�3�3�
A�
A���s�4�y�y�=�=�#�f�f�T�!�W�o�o�5��@�F���g�%�F�F�+�f�4�4rc��d|zS)Nz<span class="grey">%s</span>r�rFs  r�greyzHTMLDoc.greys
��!?�$�!F�Frc�:�|D]}||vrd||�d|�d�cS�|S)z:Make a link for an identifier, given name-to-URL mappings.�	<a href="�">�</a>r�)r:r#�dictsr5s    r�namelinkzHTMLDoc.namelink�sE���	B�	B�D��t�|�|�|�04�T�
�
�
�D�D�D�A�A�A�A���rc	��|jtj�|j��}}t||��r1t
||��|urd|j�d|�dt||���d�St||��S)zMake a link for a class.r��.html#r�r�)r)r	rrrr�rr])r:rAr\r#r�s     r�	classlinkzHTMLDoc.classlink�s����������8I�(J�(J�f���6�4� � �	C�W�V�T�%:�%:�f�%D�%D�%D��������y���'A�'A�'A�'A�C�
C����)�)�)rc�(�d|j�d|j�d�S)zMake a link for a module.r��.html">r�)r)rIs  r�
modulelinkzHTMLDoc.modulelink�s���-3�_�_�_�f�o�o�o�N�Nrc��|\}}}}|r|�|��S|r	|�d|�d�}nd|z}|rd|z}n|}d|�d|�d�S)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
r��shadowed�urlrfs        r�
modpkglinkzHTMLDoc.modpkglink�s{��*4�'��d�I�x��	#��9�9�T�?�?�"��	#�"&�$�$����-�C�C��d�"�C��	�7�$�>�D�D��D��(+���T�T�T�2�2rc��d|�d|�d�S)zMake a link to source file.z<a href="file:r�r�r�)r:r�r
s   r�filelinkzHTMLDoc.filelink�s���-0�S�S�$�$�$�7�7rc��|p|j}g}d}tjd��}	|�||��}	|	s�n�|	���\}
}|�||||
�����|	���\}}
}}}}|
r=||���dd��}|�d|�d|�d����n3|r8d	t|��z}|�d|�d||���d���n�|r8d
t|��z}|�d|�d||���d���n�|rW|||dz�dkr-|�d
|�	||��z��n|�d|z��nf|||dz�dkr,|�|�	||||����n)|�|�	||����|}���|�|||d�����d�
|��S)z�Mark 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+))T�"z&quot;r�r�r�z(https://www.rfc-editor.org/rfc/rfc%d.txtz!https://peps.python.org/pep-%04d/rT�(zself.zself.<strong>%s</strong>NrK)rGrM�compile�search�spanr�groupsrh�intr�rX)r:rfrG�funcs�classesr�r��here�pattern�match�start�endr��scheme�rfc�pep�selfdotr#r�s                   r�markupzHTMLDoc.markup�su���&�4�;�������*�3�4�4��	��N�N�4��.�.�E���%������J�E�3��N�N�6�6�$�t�E�z�"2�3�3�4�4�4�38�<�<�>�>�0�C���c�7�D��
=��f�S�k�k�)�)�#�x�8�8���������S�S�S�A�B�B�B�B��
=�@�3�s�8�8�K���������V�V�C�[�[�[�[�I�J�J�J�J��

=�9�C��H�H�D���������V�V�C�[�[�[�[�I�J�J�J�J��

=���C��E�	�?�c�)�)��N�N�7�T�]�]�4��-I�-I�#I�J�J�J�J��N�N�#=��#D�E�E�E�E��c�#�a�%�i��C�'�'����t�}�}�T�7�E�7�K�K�L�L�L�L����t�}�}�T�7�;�;�<�<�<��D�7	�8	���v�v�d�4�5�5�k�*�*�+�+�+��w�w�w���rc���d}|D]�}t|��td��ur�|\}}|dz}||�||��z}|rU||fkrNg}|D]+}	|�|�|	|�����,|dzd�|��zdz}|dz}��t|��tg��ur|d|�|||��zz}��d	|zS)
zAProduce HTML for a class tree as given by inspect.getclasstree().rKr�z<dt class="heading-text">r��, �)z
</dt>z
<dd>
%s</dd>
z
<dl>
%s</dl>
)rCr�rrX�
formattree)
r:�treer\�parentrP�entry�c�bases�parentsr<s
          rr�zHTMLDoc.formattree�s�����
	'�
	'�E��E�{�{�d�2�h�h�&�&� ���5��"=�=���$�.�.��G�"<�"<�<���E�U�v�i�/�/� �G� %�F�F�����t�~�~�d�G�'D�'D�E�E�E�E�#�c�\�D�I�I�g�,>�,>�>��D�F��)�+����e����R���(�(��"3�d�o�o��7�A�7'�7'�#'�'��� �6�)�)rc
����|j}	|j}n#t$rd}YnwxYw|�d��}g}t	t|��dz
��D]B}|�dd�|d|dz����d||�d����Cd�||dd�z��}	d|	z}
	tj	|��}tj�|��}��
||��}
n#t$rd	}
YnwxYwg}t|d
��rwt!|j��}|dd�dkr*|dd�d
kr|dd����}|�d��|��z��t|d��r:|���t!|j������|r|
dd�|��zz}
��|��}|�dt-��z}nd}��|
d|
z|z��}tj|tj��}gi}}tj|tj��D]T\}}|�tj|��p||ur5t9|||��r$|�||f��d|zx||<||<�U|D]z\}}|jD]m}|j|j}}t>j �!|��}||kr8|r6t||��r&tE||��|ur||vr|dz|zx||<||<�n�{gi}}tj|tj#��D]�\}}|�*tj$|��stj|��|urOt9|||��r>|�||f��d|z||<tj%|��r||||<��g}tj|tL��D]-\}}t9|||��r|�||f���.��'tQ|���j)||��}|od|z}|d|zz}t|d��r�g}tUj+|j,��D]\}}} |�||| df��� |�-����.|�j/��}!|��0dd|!��z}n5|r3��.|�fd���}!|��0dd|!��z}|r�d �|D��}"��1tj2|"d��|��g}!|D]1\}}|!���3|||||�����2|��0d!d"d#�|!����z}|rcg}!|D]1\}}|!���3|||||�����2|��0d$d%d#�|!����z}|r`g}!|D].\}}|!���3||�����/|��0d&d'd(�|!����z}t|d)��rG��'t!|j4���j)��}!|��0d*d+|!��z}t|d,��rG��'t!|j5���j)��}!|��0d-d.|!��z}|S)/z/Produce HTML documentation for a module object.NrrTr�z.html" class="white">r�r�!<strong class="title">%s</strong>rr���$Revision: �$z
version %sr�z (%s)r�z-<br><a href="%(docloc)s">Module Reference</a>rKz<a href=".">index</a><br>r�r�z#-z<span class="code">%s</span>z
<p>%s</p>
r�rzPackage Contentszpkg-contentc�:����|d��Sry)r�)�tr:s �rr�z#HTMLDoc.docmodule.<locals>.<lambda>9s���4�?�?�1�Q�4�#8�#8�r�Modulesc��g|]\}}|��Sr�r��r�r�r�s   rr�z%HTMLDoc.docmodule.<locals>.<listcomp>>s��;�;�;�<�C���;�;�;r�Classes�indexr�	Functions�	functions�Data�datarur��Author�authorr��Credits�credits)6r)�__all__r8rryrWrrXrr(�urllib�parse�quoter�rGr�rDr�rVrGr�r.�localsrhrzr_r �	getmoduler�r{rr	rrrr`r-r,rdr�rQrw�pkgutil�iter_modulesr�r�r}r�rrr��getclasstreerr�r�)#r:rAr#�mod�ignoredr��parts�linksr��
linkedname�headr
r�r�r�versionr-rPrr��cdictr�r�r<r\r�r��fdictr�r=�modpkgs�importer�ispkgrc�	classlists#`                                  rrzHTMLDoc.docmodule�s!������	��.�C�C���	�	�	��C�C�C�	�����
�
�3�������s�5�z�z�!�|�$�$�	3�	3�A��L�L�L����%���1���+�&�&�&�&��a����2�
3�
3�
3�
3��X�X�e�e�B�C�C�j�0�1�1�
�2�Z�?��	$��%�f�-�-�D��,�$�$�T�*�*�C��}�}�S�$�/�/�H�H���	$�	$�	$�#�H�H�H�	$�������6�=�)�)�	=��&�,�-�-�G��s��s�|�1�1�1�g�b�c�c�l�c�6I�6I�!�"�R�%�.�.�.�0�0���K�K��t�{�{�7�';�';�;�<�<�<��6�:�&�&�	;��K�K����C���$8�$8�9�9�:�:�:��	4��'�D�I�I�d�O�O�3�3�D�����'�'����D�v�x�x�O�F�F��F����d�$?�(�$J�V�$S�T�T���$�V�W�-=�>�>���R���!�,�V�W�_�E�E�	:�	:�J�C�����"�5�)�)�3�V��>�>��s�C��0�0�:��N�N�C��<�0�0�0�03�c�	�9�E�#�J��u���!�	P�	P�J�C����
P�
P��#�}�d�o�W�������1�1���d�?�?�v�?�'�&�#�2F�2F�?��v�s�+�+�t�3�3�"�e�|�|�7>��7I�C�7O�O�E�#�J��t���

P��2�u��!�,�V�W�5F�G�G�	L�	L�J�C�����!�%�(�(� �,3�,=�e�,D�,D��,N�,N��s�C��0�0�L��L�L�#�u��.�.�.�!%���E�#�J��)�%�0�0�K��s��%��,����!�,�V�V�<�<�	*�	*�J�C���3��V�,�,�
*����S�%�L�)�)�)���k�k�&��.�.�$�.�%��G�G���:�4�s�:���-�#�-�-���6�:�&�&�	4��G�,3�,@���,Q�,Q�
:�
:�(��'�5������u�a�8�9�9�9�9��L�L�N�N�N��'�'����A�A�H��d�o�o�"�M�8�=�=�=�F�F�
�	4��'�'��8�8�8�8�:�:�H��d�o�o��=�(�4�4�4�F��	8�;�;�7�;�;�;�I����� 4�Y�� B� B�D�I�I�K�H�%�
O�
O�
��U�����
�
�e�S�$��u� M� M�N�N�N�N��d�o�o��7�C�H�H�X�$6�$6�8�8�8�F��	>��H�#�
O�
O�
��U�����
�
�e�S�$��u� M� M�N�N�N�N��d�o�o��[�#�(�(�8�*<�*<�>�>�>�F��	9��H�"�
;�
;�
��U�����
�
�e�S� 9� 9�:�:�:�:��d�o�o����
�
�h� 7� 7�9�9�9�F��6�<�(�(�	L��{�{�3�v�'8�#9�#9�4�>�J�J�H��d�o�o�h��(�K�K�K�F��6�=�)�)�	N��{�{�3�v�'9�#:�#:�D�N�K�K�H��d�o�o�i��H�M�M�M�F��
s��!�!�A	D
�
D�Dc�*�������� �!��j}|p|}�j}g}	|	j� G� fd�d��}
|
���tt	j�����}t
|��dkrV����� d��|D])}� d��|�j	��z���*� d��������� �fd�}
��� �fd�}������� �fd	�}�fd
�t���D��}i�|D]O\}}}}d|zdz|zx�|<}	t�|��}n#t$rYnwxYw	|�|<�@#t$rY�LwxYw|r�|r|����!n|d
d�!t|�!fd���\}}�t jur�!t jur|}�\�!�urd}nd���!�j	��z}|dz
}t%|���|
d|z|d���}|
d|z|d���}|
d|z|d���}|d|z|d���}|d|z|d���}|d|z|d���}|}|��d�|	��}	||kr
d|�d |�d!�}nd"|�d#|�d$|�d%�}|rPg}|D]0}|���|�j	�����1|d&d'�|��zz}d}	t	j���}n#t*tf$rd(}YnwxYw|r2t-|��}|r!|d)kr|��|��zd*z}t1���}|r||pdz}��|�j�����}|od+|z}��|d,|	d-|��S).z.Produce HTML documentation for a class object.c� ��eZdZd�Z�fd�ZdS)�(HTMLDoc.docclass.<locals>.HorizontalRulec��d|_dSr���needoner@s rr�z1HTMLDoc.docclass.<locals>.HorizontalRule.__init__f�
�� ����rc�:��|jr�d��d|_dS)Nz<hr>
rTr��r:�pushs �r�maybez.HTMLDoc.docclass.<locals>.HorizontalRule.maybeh�%����<�#��D��N�N�N� ����rN�r)rrr�r��r�s�r�HorizontalRuler�e�=�������
!�
!�
!�
!�
!�
!�
!�
!�
!�
!rr�rUz&<dl><dt>Method resolution order:</dt>
z<dd>%s</dd>
�</dl>
c�f��t||��\}}|r��
����|��|D]x\}}}}	t�
|��}���||��	���
����n0#t$r#���||�����YnwxYw�d���y|S)NrS�r�r�rr�	Exceptionr)�msgr�r��okr#r��homeclsr�r�r��hr�mdictr�rAr�r:s        ��������r�spillzHTMLDoc.docclass.<locals>.spillxs���#�E�9�5�5�I�B���

����
�
�
���S�	�	�	�24�
�
�.�D�$���H� '��� 5� 5����T�]�]�5�$��(-�w��v�G�G�H�H�H�H��%�=�=�=���T�\�\�%��s�;�;�<�<�<�<�<�=�����D��J�J�J�J��Ls�A5�5*B"�!B"c����t||��\}}|rI�����
|��|D]'\}}}}�
��||�	�����(|Sr��r�r�r�r�r�r�r�r#r�r�r�r�r�r�r:s        ����r�spilldescriptorsz*HTMLDoc.docclass.<locals>.spilldescriptors��x���#�E�9�5�5�I�B���
9����
�
�
���S�	�	�	�24�9�9�.�D�$����D����e�T�3�7�7�8�8�8�8��Lrc���t||��\}}|r������|��|D]�\}}}}��t�|��|���}t	|��}	|	s�d|z��nA��t	|���j��
�
��}	d|	z}	�d|�|	�d����d����|S)Nz<dl><dt>%s</dl>
z <dd><span class="code">%s</span>�<dl><dt>r�rS)r�r�rrrQr�rw)r�r�r�r�r#r�r�r�r<r=r�r�r�r�r�rAr�r:s          ��������r�	spilldataz#HTMLDoc.docclass.<locals>.spilldata�s����#�E�9�5�5�I�B���

����
�
�
���S�	�	�	�24�
�
�.�D�$����=�=����)>�)>��c�J�J�D� ��-�-�C��B���0�4�7�8�8�8�8�"�k�k�&��-�-���*/��%�A�A��@�3�F�����d�d�C�C�C�@�A�A�A��D��J�J�J�J��Lrc�H��g|]\}}}}t|�����||||f��S�)r9�r��r�r#r�r"r�rAs     �rr�z$HTMLDoc.docclass.<locals>.<listcomp>��L���3�3�3�+�T�4��e���&�1�1�1�3�$��c�5�)�3�3�3rr��-rc���|d�uS�NrUr��r��	thisclasss �rr�z"HTMLDoc.docclass.<locals>.<lambda>�����A�a�D�I�<M�r�defined here�inherited from %sz:<br>
z
Methods %sc��|ddkS�NrT�methodr��r�s rr�z"HTMLDoc.docclass.<locals>.<lambda>����A�a�D�H�$4�rzClass methods %sc��|ddkS�NrTzclass methodr�r
s rr�z"HTMLDoc.docclass.<locals>.<lambda>����A�a�D�N�$:�rzStatic methods %sc��|ddkS�NrTz
static methodr�r
s rr�z"HTMLDoc.docclass.<locals>.<lambda>����A�a�D�O�$;�rzReadonly properties %sc��|ddkS�NrTr�r�r
s rr�z"HTMLDoc.docclass.<locals>.<lambda>����q��t�7J�/J�rzData descriptors %sc��|ddkS�NrTr�r�r
s rr�z"HTMLDoc.docclass.<locals>.<lambda>����q��t�7H�/H�rzData and other attributes %sc��|ddkS�NrTr�r�r
s rr�z"HTMLDoc.docclass.<locals>.<lambda>�����!����rrK�	<a name="z">class <strong>�
</strong></a>z<strong>z</strong> = <a name="z">class r��(%s)r�N�()rtz&<span class="code">%s<br>&nbsp;</span>rbrj)r)r{rrr�getmrorWr�r�rr�rr�rG�popleftr��builtinsrAr�rX�	signature�
ValueErrorrDrGrQr�rwrp)"r:rAr#r�r�r�r��realnamer�rcr��mror<r�r�r�r�r�r�r�r��anchor�	inherited�tagrbr��declr%�argspecr=r�r�r�rs"`` ```                        @@@@rrzHTMLDoc.docclassZs�������������?����x��� �������	!�	!�	!�	!�	!�	!�	!�	!�	!�	!��^�
�
���G�N�6�*�*�+�+���s�8�8�a�<�<��H�H�J�J�J��D�:�;�;�;��
J�
J����_�t�~�~�d�6<�6G�(I�(I�I�J�J�J�J��D��O�O�O�	�	�	�	�	�	�	�	�	�	�	�	�$	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�$3�3�3�3�/C�F�/K�/K�3�3�3����).�
	�
	�%�C��w��"%��*�s�"2�S�"8�8�E�#�J��
����-�-�����
�
�
���
����
� &��e�����
�
�
���
�����!	��
(��K�K�M�M�	�	�!�!�H�Q�K�	�*�5�2M�2M�2M�2M�N�N��E�9��X�_�,�,��h�o�1M�1M�!����f�$�$�$���)�D�N�N�9�;A�;L�-N�-N�N���9��C��E�6�*�*�*��E�,��,�e�4�4�6�6�E��E�,�s�2�E�:�:�<�<�E��E�-��3�U�;�;�=�=�E�$�$�%=��%C�U�%J�%J�L�L�E�$�$�%:�S�%@�%�%H�%H�J�J�E��I�<�s�B�E�6�6�8�8�E��E�C�!	�F�7�7�8�$�$���8�������h�h�h� �E�E��
���d�d�d�H�H�H�&�E��	8��G��
H�
H�����t�~�~�d�F�4E�F�F�G�G�G�G��F�T�Y�Y�w�%7�%7�7�7�E���	��)�&�1�1�I�I���I�&�	�	�	��I�I�I�	�����	<��)�n�n�G��
<�7�d�?�?��d�k�k�'�2�2�2�V�;���V�n�n���	%��#�)��$�C��k�k�#�t�~�u�g�u�E�E���D�>��D���|�|�E�7�H�a��=�=�=s6�D0�0
D=�<D=�E�
E�E�K2�2L�Lc�X�|�d|�|��z��S�z)Format an argument default value as text.�=)rrrIs  r�formatvaluezHTMLDoc.formatvalue�s%���y�y��t�y�y��0�0�0�1�1�1rc��|j}|p|}|r|jpddz|z}	d}
d}t|��rp|jj}|r||urd|�||��z}
nD|j�$d|�|jj|��z}
nd|�||��z}
tj|��stj|��rd}
nd}
||kr
d	|	�d
|�d�}n>|r/tj||g��|urd|jdz|z�d
|�d�}d}n|}d	|	�d
|�d|��}d}tj	|��rU	tj
|��}n#ttf$rd}YnwxYw|r$t|��}|dkrd|z}|dd�}|sd}|
|z|�|��z|
o|�d|
z��z}|rd|zS|�t#|��|j|||��}|od|z}d|�d|�d�S)z;Produce HTML documentation for a function or method object.rKrr� from N� method of %s instance� unbound %s method�async rz
"><strong>rz
<a href="#r�r�rTz</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>r�z</dt>r�)r)rwr*r+r�r�iscoroutinefunction�isasyncgenfunction�getattr_staticr`r%r&rGrDrGrr�rQrw)r:rAr#r�r�r�r�rr'r)�note�skipdocs�imclass�asyncqualifierrb�reallinkr-r%r,r=s                    rrzHTMLDoc.docroutines����?����x���$���*��c�1�D�8�������F�#�#�
	N��o�/�G��
N��"�$�$�#�d�n�n�W�c�&B�&B�B�D���?�.�3�d�n�n���1�3�78�78�8�D�D�0�$�.�.���2M�2M�M�D��'��/�/�	 ��*�6�2�2�	 �%�N�N��N��8����>D�f�f�h�h�h�O�E�E��
$�g�,�R��2�>�>�&�H�H�H��K�#�%��0�0�0�(�(�(�<�����#���������h�h�(�E�����V�$�$�	,�
!�#�-�f�5�5�	�	���	�*�
!�
!�
!� �	�	�	�
!�����
,��i�.�.���z�)�)�B�T�I�E�&�a��d�m�G��	��G���%����G�(<�(<�<��AH��y�y�?�$�F�G�G�I���	<�+�d�2�2��+�+��v������w��I�I�C��G�A�C�G�C�C�15���s�s�s�;�;s�2E�E�Ec���g}|j}|r|d|z��|�t|��|j��}|r|d|z��|d��d�|��S)z1Produce html documentation for a data descriptor.z!<dl><dt><strong>%s</strong></dt>
z&<dd><span class="code">%s</span></dd>
r�rK)rr�rQrwrX�r:rAr#r�rr�r�r=s        rrzHTMLDoc.docdataAs������~���	>��D�5��<�=�=�=��k�k�&��.�.�$�.�9�9���	B��D�:�S�@�A�A�A���Y�����w�w�w���rc�D�|rd|zpd}||�|��zS)z-Produce HTML documentation for a data object.z<strong>%s</strong> = rK�r)r:rAr#r�r��lhss      rrzHTMLDoc.docotherQs.���6�/�$�6�<�"���T�Y�Y�v�&�&�&�&rc�F�g}|�i}tj|g��D]@\}}}td�|D����r� |�|d|||vf��d||<�A|���|�||j��}|�|d|��S)z2Generate an HTML index for a directory of modules.Nc3�PK�|]!}dt|��cxkodkncV��"dS)i�i��N)�ord�r��chs  r�	<genexpr>z HTMLDoc.index.<locals>.<genexpr>[sD����@�@�R�F�c�"�g�g�/�/�/�/��/�/�/�/�@�@�@�@�@�@rrKrTr�)r�r��anyrr�r}r�rr)r:rr�r�r�r#r�rcs        rr�z
HTMLDoc.indexVs��������X�%,�%9�3�%�%@�%@�	�	�!�H�d�E��@�@�4�@�@�@�@�@�
���N�N�D�"�e�T�X�-=�>�?�?�?��H�T�N�N��������#�#�G�T�_�=�=�����s�G�X�6�6�6r�rK)rirKNrfr�r��NNN)r)rrr@r4�_repr_instancerrGrdrhrprrrwr}rr�r�r�r�r�r�r�rrr1rrr0rr�r�rrr_r_5s�������1�1��X�Z�Z�N���D�
�
"�F�
&�
&�
&�&�&�&�&�34�19�U�U�U�U�**�*�*�
<�<�<�
5�
5�
5�G�F�F����*�*�*�O�O�O�
3�
3�
3�8�8�8�#'�b�"�b�' �' �' �' �V*�*�*�*�&s�s�s�s�j%)�d�"�b�`>�`>�`>�`>�D2�2�2�'+���R���?<�?<�?<�?<�B � � � ��K�'�'�'�'�

7�
7�
7�
7�
7�
7rr_c�.�eZdZdZd�Zd�Zd�ZeZd�ZdS)�TextReprzAClass for safely making a text representation of a Python object.c�t�tj|��dx|_|_d|_dx|_|_dSr6r:r@s rr�zTextRepr.__init__irArc�f�tt|��d��rfdd�t|��j�����z}t||��rt||��||��St
tt|����|j	��SrK)
r�rCrXr)rrrprtrr?rMs    rrPzTextRepr.repr1os����4��7�7�J�'�'�	;� �3�8�8�D��G�G�,<�,B�,B�,D�,D�#E�#E�E�J��t�Z�(�(�
;�0�w�t�Z�0�0��E�:�:�:��G�D��G�G�$�$�d�m�4�4�4rc��t||j��}t|��}d|vr*dt|dd��vrd|dz|z|dzS|S)Nr�rRrKrSr)rpr>rrhrTs     rrWzTextRepr.repr_stringvsa���A�t�~�&�&����:�:���4�<�<�D���%��(D�(D�D�D���!��$�t�+�h�q�k�9�9��rc��	ttt|����|j��S#d|jjzcYSxYwrY)rprtrr>r+r)rZs   rr[zTextRepr.repr_instance�sF��	:����Q���(�(�$�.�9�9�9��	:�"�Q�[�%9�9�9�9�9���s	�.1�AN)	r)rrr@r�rPrWr\r[r�rrrQrQgs]������K�K�-�-�-�5�5�5�����H�:�:�:�:�:rrQc��eZdZdZe��ZejZd�Zdd�Zd�Z	dd�Z
dd	�Zdd
�Zd�Z
dd�Zdd
�ZeZdd�ZdS)�TextDocz'Formatter class for text documentation.c�@�d�d�|D����S)z(Format a string in bold by overstriking.rKc3�&K�|]}|dz|zV��
dS)�Nr�rIs  rrKzTextDoc.bold.<locals>.<genexpr>�s*����5�5�"�r�D�y�2�~�5�5�5�5�5�5r)rXrFs  r�boldzTextDoc.bold�s#���w�w�5�5��5�5�5�5�5�5r�    c���|sdS�fd�|�d��D��}|r|d���|d<d�|��S)z6Indent text by prepending a given prefix to each line.rKc���g|]}�|z��Sr�r�)r�r��prefixs  �rr�z"TextDoc.indent.<locals>.<listcomp>�s���<�<�<�4��$��<�<�<rrSr)rrOrX)r:rfr_rYs  ` r�indentzTextDoc.indent�sb�����B�B�<�<�<�<�4�:�:�d�+;�+;�<�<�<���0�e�B�i�.�.�0�0�%��)��y�y����rc��|�|�����}|�|��dz|zdzS)z&Format a section with a given heading.rSrt)r`rOr[)r:rbrc�clean_contentss    rrpzTextDoc.section�s@�����X�.�.�5�5�7�7���y�y����$�&��7�&�@�@rNrKc	�p��d}|D]�}t|��td��urS|\}}||zt|���z}|r0||fkr)�fd�|D��}	|dd�|	��zz}|dz}�st|��tg��ur||�|�||dz��z}��|S)zBRender in text a class tree as returned by inspect.getclasstree().rKr�c3�8�K�|]}t|���V��dSr��r])r�r�r\s  �rrKz%TextDoc.formattree.<locals>.<genexpr>�s-�����D�D��y��G�4�4�D�D�D�D�D�Drr r�rSr\)rCr]rXr�)
r:r�r\r�r_rPr�r�r�r�s
  `       rr�zTextDoc.formattree�s�������
	8�
	8�E��E�{�{�d�2�h�h�&�&� ���5��&��9�Q��+@�+@�@���B�U�v�i�/�/�D�D�D�D�e�D�D�D�G�#�f�t�y�y��/A�/A�&A�A�F��$�����e����R���(�(��$�/�/��7�A�v���#8�#8�8����
rc	��|j}tt|����\}}|�d||od|zz��}t	|dd��}|�|��}|�||�d|dz��z}|r||�d|��z}g}	t
j|tj��D]G\}
}|�t
j	|��p||ur(t|
||��r|	�|
|f���Hg}t
j|tj��D]Y\}
}|�*t
j
|��st
j	|��|ur(t|
||��r|�|
|f���Zg}
t
j|t��D]-\}
}t|
||��r|
�|
|f���.g}t��}t!|d��r�t#j|j��D]K\}}}|�|��|r|�|d	z���6|�|���L|���||�d
d�|����z}g}t
j|tj��D];\}
}|j�|dz��r|
|vr|�|
���<|r@|���||�d
d�|����z}|	r�d�|	D��}|�t
j|d��|��g}|	D]/\}
}|�|�||
|�����0||�dd�|����z}|r`g}|D]/\}
}|�|�||
|�����0||�dd�|����z}|
rbg}|
D]1\}
}|�|�||
|d������2||�dd�|����z}t!|d��ret;|j��}|dd�dkr*|dd�dkr|dd����}||�d|��z}t!|d��r+||�dt;|j ����z}t!|d��r+||�dt;|j!����z}t!|d��r+||�d t;|j"����z}	t
j#|��}n#tH$rd!}YnwxYw||�d"|��z}|S)#z5Produce text documentation for a given module object.�NAMEr�r�NzMODULE 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�
SUBMODULESc��g|]\}}|��Sr�r�r�s   rr�z%TextDoc.docmodule.<locals>.<listcomp>�s��9�9�9�:�3���9�9�9rrT�CLASSES�	FUNCTIONS�F)rm�DATAr�r�r�rr��VERSIONr��DATEr��AUTHORr��CREDITSr�FILE)%r)rZrQrprr.rrzr r�r�rr`r-rd�setr�r�r�r��addr�rXr_r�r�r�rrrDr�rVr�r�r�r(rG)r:rAr#r��synop�descrPr�r-r�r�r�r�r�r��
modpkgs_namesr�r\r��
submodulesr�rcr�r�s                        rrzTextDoc.docmodule�s\������v�f�~�~�.�.���t����f�d�e�.E���
�&F�G�G���f�i��.�.������'�'�����d�l�l�+=�v�I�@����F��	@��d�l�l�=�$�?�?�?�F���!�,�V�W�_�E�E�	1�	1�J�C�����%�e�,�,�6��6�A�A��s�C��0�0�1��N�N�C��<�0�0�0����!�,�V�W�5F�G�G�	/�	/�J�C�����!�%�(�(� �,3�,=�e�,D�,D��,N�,N��s�C��0�0�/��L�L�#�u��.�.�.����!�,�V�V�<�<�	*�	*�J�C���3��V�,�,�
*����S�%�L�)�)�)�������
��6�:�&�&�
	8�,3�,@���,Q�,Q�
,�
,�(��'�5��!�!�'�*�*�*��,��N�N�7�\�#9�:�:�:�:��N�N�7�+�+�+�+��L�L�N�N�N��d�l�l�"�D�I�I�g�$6�$6�8�8�8�F��
�!�,�V�W�5E�F�F�	'�	'�J�C���~�(�(����4�4�
'��M�9Q�9Q��!�!�#�&�&�&���	5��O�O�����d�l�l��d�i�i�
�3�3�5�5�5�F��	K�9�9��9�9�9�I�����$�Y��2�2�D�:�:�;�H�%�
A�
A�
��U�����
�
�e�S�$� ?� ?�@�@�@�@��d�l�l�9�d�i�i��6I�6I�J�J�J�F��	M��H�#�
A�
A�
��U�����
�
�e�S�$� ?� ?�@�@�@�@��d�l�l�;��	�	�(�8K�8K�L�L�L�F��	H��H�"�
L�
L�
��U�����
�
�e�S�$�r�
� J� J�K�K�K�K��d�l�l�6�4�9�9�X�3F�3F�G�G�G�F��6�=�)�)�	?��&�,�-�-�G��s��s�|�1�1�1�g�b�c�c�l�c�6I�6I�!�"�R�%�.�.�.�0�0���d�l�l�9�g�>�>�>�F��6�:�&�&�	I��d�l�l�6�3�v��3G�3G�H�H�H�F��6�<�(�(�	M��d�l�l�8�S��9J�5K�5K�L�L�L�F��6�=�)�)�	O��d�l�l�9�c�&�:L�6M�6M�N�N�N�F�	 ��%�f�-�-�D�D���	 �	 �	 ��D�D�D�	 �����$�,�,�v�t�4�4�4���
s�9W�W�Wc�R��������j}|p|}�j}�jfd�}||krd��|��z}n��|��dz|z}|r+t	||��}	|dd�|	��zz}g}
|
j�	tj���}n#ttf$rd}YnwxYw|r(t|��}|r|dkr�||zdz��t���}
|
r�|
dz��ttj�����}t|��d	kr2�d
��|D]}�d||��z����d��t!d
�t"����D��tj���}t|��}d}|rX�d��|d|�D]}�d|z���||kr!�dt||z
��zdz���d��G�fd�d��}|��������fd�}����fd�}�����fd�}�fd�t)���D��}|r�|r|����n|dd	�t-|�fd���\}}�t.jur�t.jur|}�\��urd}ndt3��j��z}t5|���|d|z|d���}|d|z|d ���}|d!|z|d"���}|d#|z|d$���}|d%|z|d&���}|d'|z|d(���}|}|��d�|
��}
|
s|dzS|dz��|
���d)��zdzS)*z4Produce text documentation for a given class object.c�"�t||��Sr�re)r�r�s  r�makenamez"TextDoc.docclass.<locals>.makenames���Q��?�?�"r�class z	 = class r r�Nr!rSrUzMethod resolution order:r\rKc3�K�|]=}|j�d��s!|jdk�'t|j��V��>dS)r�r$N)r)r�rrD)r�r"s  rrKz#TextDoc.docclass.<locals>.<genexpr>Asa����
S�
S�3��L�+�+�C�0�0�
S�58�^�z�5Q�5Q����
�
�5Q�5Q�5Q�5Q�
S�
Srr�r�zBuilt-in subclasses:z    ... and z other subclassesc� ��eZdZd�Z�fd�ZdS)�(TextDoc.docclass.<locals>.HorizontalRulec��d|_dSr�r�r@s rr�z1TextDoc.docclass.<locals>.HorizontalRule.__init__Sr�rc�:��|jr�d��d|_dS)NzF----------------------------------------------------------------------rTr�r�s �rr�z.TextDoc.docclass.<locals>.HorizontalRule.maybeUr�rNr�r�s�rr�r�Rr�rr�c	�H��t||��\}}|r������|��|D]i\}}}}	t�
|��}���||�	�
�����:#t$r#���||�	����Y�fwxYw|Sr�r�)
r�r�r�r�r#r�r�r�r�r�rAr�r:s
        �����rr�zTextDoc.docclass.<locals>.spill[s����#�E�9�5�5�I�B���
<����
�
�
���S�	�	�	�24�	<�	<�.�D�$���<� '��� 5� 5����T�]�]�5�(,�c�6�;�;�<�<�<�<��%�=�=�=���T�\�\�%��s�;�;�<�<�<�<�<�=�����Ls�A2�2*B�Bc����t||��\}}|rI�����
|��|D]'\}}}}�
��||�	�����(|Sr�r�r�s        ����rr�z*TextDoc.docclass.<locals>.spilldescriptorslr�rc
�L��t||��\}}|r��
����
|��|D]k\}}}}t|��}	t�|��}	n#t$r|j|}	YnwxYw�
��|	|�d|���dz���l|S)Nrn)rmr=rS)r�r�rQrr8�__dict__r)r�r�r�r�r#r�r�r�r=r9r�r�rAr�r:s          �����rr�z#TextDoc.docclass.<locals>.spilldataus����#�E�9�5�5�I�B���

����
�
�
���S�	�	�	�24���.�D�$��� ��-�-�C�5�%�f�d�3�3����)�5�5�5�%�.�t�4����5�����D����s�D�#�b�c��J�J��������Ls�A � A:�9A:c�H��g|]\}}}}t|�����||||f��Sr�r�rs     �rr�z$TextDoc.docclass.<locals>.<listcomp>�rrrc���|d�uSrr�rs �rr�z"TextDoc.docclass.<locals>.<lambda>�rrrr	zMethods %s:
c��|ddkSrr�r
s rr�z"TextDoc.docclass.<locals>.<lambda>�rrzClass methods %s:
c��|ddkSrr�r
s rr�z"TextDoc.docclass.<locals>.<lambda>�rrzStatic methods %s:
c��|ddkSrr�r
s rr�z"TextDoc.docclass.<locals>.<lambda>�rrzReadonly properties %s:
c��|ddkSrr�r
s rr�z"TextDoc.docclass.<locals>.<lambda>�rrzData descriptors %s:
c��|ddkSrr�r
s rr�z"TextDoc.docclass.<locals>.<lambda>�rrzData and other attributes %s:
c��|ddkSrr�r
s rr�z"TextDoc.docclass.<locals>.<lambda>�rrz |  )r)r{rr[�maprXrrr%r&rGrDrQrr"rW�sortedrC�__subclasses__r+r�r#r�r$rAr]r�r`rO)r:rAr#r�r�r'r�r}rbr�rcr%r-r=r(r<�
subclasses�no_of_subclasses�MAX_SUBCLASSES_TO_DISPLAY�subclassnamer�r�r�r�r�r*r+r�r�rs`` `                       @@@rrzTextDoc.docclasss����������?����x��� �� �+�	#�	#�	#�	#��8����t�y�y��2�2�2�E�E��I�I�d�O�O�k�1�H�<�E��	8��(�E�*�*�G��F�T�Y�Y�w�%7�%7�7�7�E������	��)�&�1�1�I�I���I�&�	�	�	��I�I�I�	�����	,��)�n�n�G��
,�7�d�?�?���T�G�^�d�*�+�+�+��V�n�n���	��D��t������G�N�6�*�*�+�+���s�8�8�a�<�<��D�+�,�,�,��
.�
.����V�h�h�t�n�n�,�-�-�-�-��D��H�H�H��
S�
S�$�*=�*=�f�*E�*E�
S�
S�
S��	�
�
�
�
�
�z�?�?��$%�!��	��D�'�(�(�(� *�+E�,E�+E� F�
,�
,����V�l�*�+�+�+�+��";�;�;���^��)�,E�E�F�F�G�(�)�*�*�*�
�D��H�H�H�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!��^�
�
��	�	�	�	�	�	�	�	�	�"	�	�	�	�	�	�	�	�
	�
	�
	�
	�
	�
	�
	�
	�
	�3�3�3�3�/C�F�/K�/K�3�3�3���!	��
(��K�K�M�M�	�	�!�!�H�Q�K�	�*�5�2M�2M�2M�2M�N�N��E�9��X�_�,�,��h�o�1M�1M�!����f�$�$�$���)�I�i�6<�6G�-I�-I�I��
�E�6�*�*�*��E�/�C�/��4�4�6�6�E��E�/�#�5�u�:�:�<�<�E��E�0�3�6��;�;�=�=�E�$�$�%@�3�%F��%J�%J�L�L�E�$�$�%=��%C�U�%H�%H�J�J�E��I�?�#�E�u�6�6�8�8�E��E�C�!	�F�9�9�X�&�&���	 ��4�<���t�|�d�k�k�(�/�/�*;�*;�V�D�D�D�t�K�Ks�B)�)B?�>B?c�2�d|�|��zSr/rDrIs  rr1zTextDoc.formatvalue�s���T�Y�Y�v�&�&�&�&rc��|j}|p|}d}d}t|��r^|jj}|r||urdt	||��z}n8|j�dt	|jj|��z}ndt	||��z}tj|��stj|��rd}	nd}	||kr|�|��}
n7|rtj	||g��|urd}|�|��d	z|z}
d}tj
|��rh	tj|��}n#ttf$rd}YnwxYw|r7t|��}|d
kr"|�|��dz}
|dd�}|sd
}|	|
z|z|z}
|r|
dzSt|��pd}|
dz|o)|�|�����dzzS)z;Produce text documentation for a function or method object.rKrr3Nr4r5r6rT� = r7z lambda rr8rS)r)rwr*r+r]rr9r:r[r;r`r%r&rGrDrQr`rO)r:rAr#r�rr'r<r=r>r?rbr-r%r,r=s               rrzTextDoc.docroutine�s>���?����x�������F�#�#�
	I��o�/�G��
I��"�$�$�#�i���&=�&=�=�D���?�.�3�i���1�3�78�78�8�D�D�0�)�G�C�2H�2H�H�D��'��/�/�	 ��*�6�2�2�	 �%�N�N��N��8����I�I�h�'�'�E�E��
�g�,�R��2�>�>�&�H�H����I�I�d�O�O�e�+�h�6�E�����V�$�$�	,�
!�#�-�f�5�5�	�	���	�*�
!�
!�
!� �	�	�	�
!�����
,��i�.�.���z�)�)� �I�I�d�O�O�j�8�E�&�a��d�m�G��	��G���%��/�$�6���	L��$�;����.�.�&�B�C��$�;�#�"J�$�+�+�c�*:�*:�*A�*A�*C�*C�d�*J�K�Ks�D)�)D?�>D?c��g}|j}|r)||�|����|d��t|��pd}|r)||�|����|d��d�|��S)z1Produce text documentation for a data descriptor.rSrK)rr[rQr`rXrBs        rrzTextDoc.docdata�s������~���	��D����4���!�!�!��D��J�J�J��V�n�n�"����	��D����S�!�!�"�"�"��D��J�J�J��w�w�w���rc�P�|�|��}|r1|r|dzpd|z}|t|��z
}	|	dkr
|d|	�dz}|r|�|��dzpd|z}|st|��}|r+|d|�t|����zdzz
}|S)z-Produce text documentation for a data object.r�rKrNrkrS)rrWr[rQr`rD)
r:rAr#r�r�rmr=rr��chops
          rrzTextDoc.docother�s����y�y�� � ���	4��)�T�E�\�/�R�4�7�D��C��I�I�%�D��a�x�x��U�d�U��e� 3���0����4���5�0�6�B�$�>���	!���.�.�C��	8��D�4�;�;�s�3�x�x�0�0�0�4�7�7�D��r)r\)NrKr�rN)NNNNN)r)rrr@rQrOrr[r`rpr�rrr1rrr0rr�rrrWrW�s������1�1��X�Z�Z�N���D�6�6�6� � � � �A�A�A����� c�c�c�c�JXL�XL�XL�XL�t'�'�'�5L�5L�5L�5L�n � � � ��K������rrWc��eZdZdZd�ZdS)�
_PlainTextDocz2Subclass of TextDoc which overrides string stylingc��|Sr�r�rFs  rr[z_PlainTextDoc.bolds���rN)r)rrr@r[r�rrr�r�	s)������<�<�����rr�c�@�t��at|��dS)zCThe first time this is called, determine what kind of pager to use.N)�getpager�pagerrss rr�r�s��
�J�J�E�	�$�K�K�K�K�Krc�h��ttjd��stSttjd��stStj���rtj���stStjdkrtStj�	d��ptj�	d����r@tjdkr�fd�Stj�	d��dvr�fd	�S�fd
�Stj�	d��dvrtStjdkrd�Sttd��rtj
d
��dkrd�Sddl}|���\}}tj
|��	ttd��r2tj
d|z��dkrd�tj|��Sttj|��S#tj|��wxYw)z2Decide what method to use for paging through text.�isatty�
emscripten�MANPAGER�PAGER�win32c�>��tt|�����Sr���
tempfilepager�plain�rf�	use_pagers �rr�zgetpager.<locals>.<lambda>#s���
�e�D�k�k�9� E� E�r�TERM)�dumb�emacsc�>��tt|�����Sr�)�	pipepagerr�r�s �rr�zgetpager.<locals>.<lambda>%s���	�%��+�+�y� A� A�rc�$��t|���Sr��r�r�s �rr�zgetpager.<locals>.<lambda>'s���	�$�	� :� :�rc�<�tt|��d��S)Nzmore <r�rss rr�zgetpager.<locals>.<lambda>+s��M�%��+�+�x�@�@�r�systemz(less) 2>/dev/nullrc�"�t|d��S)N�lessr�rss rr�zgetpager.<locals>.<lambda>-s��I�d�F�3�3�rNz	more "%s"c�"�t|d��S)N�morer�rss rr�zgetpager.<locals>.<lambda>4s��	�$�� 7� 7�r)r�r	�stdin�
plainpager�stdoutr��platformrr)rr��tempfile�mkstemp�close�unlink�ttypager)r��fdr�r�s   @rr�r�s����3�9�h�'�'�����3�:�x�(�(�����9������S�Z�%6�%6�%8�%8����
�|�|�#�#����
���z�*�*�E�b�j�n�n�W�.E�.E�I��;��<�7�"�"�E�E�E�E�E�
�Z�^�^�F�
#�
#�'8�
8�
8�A�A�A�A�A�:�:�:�:�:�	�z�~�~�f���!2�2�2���
�|�w���@�@�@��r�8���4���+?�!@�!@�A�!E�!E�3�3�3��O�O�O��%�%�'�'�N�R���H�R�L�L�L���2�x� � �	�R�Y�{�X�/E�%F�%F�!�%K�%K�7�7�	�	�(������
�	�(�������	�(�������s�92H�H�H1c�.�tjdd|��S)z%Remove boldface formatting from text.z.rK)rMrNrss rr�r�:s��
�6�%��T�"�"�"rc�H�ddl}|�|d|jd���}	|j5}	|�|��n#t
$rYnwxYwddd��n#1swxYwYn#t$rYnwxYw		|���dS#t
$rYnwxYw�()z3Page through text by feeding it to another program.rNT�backslashreplace)�shellr��errors)�
subprocess�Popen�PIPEr��write�KeyboardInterruptr��wait)rf�cmdr��proc�pipes     rr�r�>s4���������C�t�:�?�#5��7�7�D�	
�
�Z�	�4�
��
�
�4� � � � ��$�
�
�
���
����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	����
�
�
���
�����	��I�I�K�K�K��E�� �	�	�	�
�D�	����	si�A+�A�A�A�
A�
A�A�A�A+�A#�#A+�&A#�'A+�+
A8�7A8�=B�
B �B c	��ddl}|���5}tj�|d��}t|ddtjdkrtjd��nd���5}|�	|��ddd��n#1swxYwYtj
|dz|zd	z��ddd��dS#1swxYwYdS)
z<Page through text by invoking a program on a temporary file.rNz	pydoc.out�wr�r�)r��encodingz "r�)r��TemporaryDirectoryrr
rXr�r	r��device_encodingr�r�)rfr�r��tempdirr�r�s      rr�r�VsY���O�O�O�	�	$�	$�	&�	&�/�'��7�<�<���5�5��
�(�C�(:��,�'�)�)��-�a�0�0�0�/3����	���J�J�t����		�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
	�	�#��*�x�'�#�-�.�.�.�/�/�/�/�/�/�/�/�/�/�/�/����/�/�/�/�/�/s6�AC�1B�C�B	�C�B	� C�C�Cc��ttjdd��pd}|�|d���|��S)Nr��utf-8r�)rr	r��encode�decode)rfr�s  r�_escape_stdoutr�bs=���s�z�:�t�4�4�?��H��;�;�x�!3�4�4�;�;�H�E�E�Erc	��tt|�����d��}	ddl}tj���}|�|��}|�|��d�}n'#tttjf$rd}d�}YnwxYw		ttj�dd����}n#t"$rd}YnwxYw|dkrd}|dz
x}}tj�d�|d|���dz��||d��rtj�d	��tj���|��}	|	d
vr tj�d��n�|	dvr1tj�d||zdz��|dz}��|	d
vr||z
|z
}|dkrd}tj�dd�||||z���zdz��||z}||d���|r|�||j|��dSdS#|r|�||j|��wwxYw)z%Page through text on a text terminal.rSrNc�@�tj�d��Sry)r	r�r�r�rrr�zttypager.<locals>.<lambda>os��#�)�.�.��+�+�rc�^�tj���dd�dd�S)NrrT)r	r�r�r�rrr�zttypager.<locals>.<lambda>rs&��#�)�,�,�.�.�s��s�3�B�Q�B�7�r�LINESrT�z
-- more --)�q�Qz
          
)�
rS)�b�B�)r�r�r�ttyr	r��fileno�	tcgetattr�	setcbreakrr8�io�UnsupportedOperationr�rr)rr&r�r�rX�flush�	tcsetattr�	TCSAFLUSH)
rfrYr�r��old�getchar�hrS�incr�s
          rr�r�gs����.��&�&�'�'�-�-�d�3�3�E�8��
�
�
�
�Y�
�
�
�
���m�m�B�����
�
�b����+�+�������)@�A�8�8�8���7�7����8����2�	��B�J�N�N�7�A�.�.�/�/�A�A���	�	�	��A�A�A�	������6�6��A��a�%���C��
������5��#��;�/�/�$�6�7�7�7��A�B�B�i�	��J���\�*�*�*��J��������	�	�A��J����
� � �!1�2�2�2���l�"�"��
� � �!1�E�!�H�!<�t�!C�D�D�D���E����&�&�&���G�c�M���q�5�5�a�!��J���T�D�I�I�e�A�a��e�G�n�$=�$=�=��D�E�E�E��C��A�!�A�B�B�i�	�&�	2��M�M�"�c�m�S�1�1�1�1�1�	2�	2��3�	2��M�M�"�c�m�S�1�1�1�1�	2���s=�AB�!B%�$B%�*-C�I*�C'�$I*�&C'�'E!I*�*!Jc�x�tj�tt	|������dS)z>Simply print unformatted text.  This is the ultimate fallback.N)r	r�r�r�r�rss rr�r��s.���J���U�>�$�/�/�0�0�1�1�1�1�1rc��tj|��rA|jtjvr
d|jzSt|d��r
d|jzSd|jzStj|��r
d|jzStj|��r$d|jj	�d|jj�d|j��Stj
|��r$d|jj	�d|jj�d|j��Stj|��r
d	|jzStj|��r
d
|jzStj
|��r
d|jzSt|��jS)z/Produce a short description of the given thing.zbuilt-in module r�zpackage zmodule zbuilt-in function zgetset descriptor rzmember descriptor r~z	function zmethod )rr_r)r	rr�r-�isgetsetdescriptorr3rr4r r,r(rC)�things r�describer��s|�������.��>�S�5�5�5�%���6�6��5�*�%�%�	.����.�.��u�~�-�-������5�#�e�n�4�4��!�%�(�(�����)�)�)�5�+=�+F�+F�+F��N�N��	��!�%�(�(�����)�)�)�5�+=�+F�+F�+F��N�N��	���u���)��%�.�(�(���%� � �,��U�^�+�+������*��5�>�)�)���;�;��rc��d�|�d��D��}d\}}|t|��krLtd�|d|dz���|��}|r||dz}}nn|t|��k�L|r|}nt}||d�D]%}	t||��}�#t$rYdSwxYw|S)z@Locate an object by name or dotted path, importing as necessary.c��g|]}|�|��Sr�r�)r�rs  rr�zlocate.<locals>.<listcomp>�s��6�6�6�d��6�T�6�6�6rrr�NrT)rrWr	rXr$rr8)r
rr�r��n�
nextmodulerArs        r�locater�s���6�6�d�j�j��o�o�6�6�6�E��I�F�A�
�c�%�j�j�.�.������t��!��t�� 5� 5�y�A�A�
��	�:�q�1�u�q�v�v���c�%�j�j�.�.���������a�b�b�	����	��V�T�*�*�F�F���	�	�	��4�4�4�	�����Ms�B.�.
B=�<B=c���t|t��r(t||��}|�td|z���||fSt	|dd��}|t|t��r|ndfS)zDGiven an object or a path to an object, get the object and its name.Nz~No Python documentation found for %r.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.r))r.rDrrr)r�rrAr#s    r�resolver�s����%����
>���y�)�)���>��,�/4�4�5�5�
5��u�}���u�j�$�/�/���j��s�3�3�=�d�d��=�=r� Python Library Documentation: %sc�N�|�t}t||��\}}t|��}tj|��}|r(d|vr$|d|d|�d���zz
}n|r||ur
|d|jzz
}tj|��swtj|��sctj	|��sOtj
|��s;t|��s,t|d��r|j
}nt|��}|dz
}||zdz|�||��zS)zBRender text documentation, given an object or a path to an object.Nrz in z in module �
__origin__z objectrt)rfrr�rr��rfindr)r_r r`r2rIr�rrCr)r�rbr�rendererrAr#rxr�s        r�
render_docr�sL�������5�)�,�,�L�F�D��F���D�
�
�v�
&�
&�F��0��t������.�t�z�z�#���.�/�/�/���	�0�F�&�(�(��
���/�/����V�$�$���o�f�%�%�����'�'���&�v�.�.���f�o�o�	��6�<�(�(�	��&�F�F��&�\�\�F��I��D��4�<�&� �8�#4�#4�V�T�#B�#B�B�Brc��|� tt|||����dS|�t|||t����dS)zCDisplay text documentation, given an object or a path to an object.N)r�rr��	plaintext)r�rbr�outputs    rr=r=�sO���~�
�j���y�1�1�2�2�2�2�2����Z��u�i��C�C�D�D�D�D�Drc�X�t||��\}}t�t|��t�||����}t|dzdd���5}|�|��ddd��n#1swxYwYtd|dz��dS)z<Write HTML documentation to a file in the current directory.r'r�r�)r�N�wrote)r�htmlrdr�rr�r��print)r�rrAr#rdr�s      r�writedocr�s����5�)�,�,�L�F�D��9�9�X�f�%�%�t�}�}�V�T�'B�'B�C�C�D�	
�d�W�n�c�G�	4�	4�	4����
�
�4����������������������	�'�4�'�>�"�"�"�"�"s�*B�B�BrKc�f�|�i}tj|g|��D]\}}}t|���dS)zAWrite out HTML documentation for all modules in a directory tree.N)r��
walk_packagesr)r�pkgpath�doner�r\r�s      r�	writedocsrsF���|�B�T�$+�$9�3�%��$I�$I��� ��'�5�������
�Frc�<�eZdZidd�dd�dd�dd�dd�d	d
�dd�d
d�dd�dd�dd�dd�dd�dd�dd�dd�dd�id d!�d"d#�d$d%�dd&�d#d'�d(d)�d*d+�d,d-�d.d/�d0d�d1d�d2d3�d4d5�d6d7�dd8�d9d:�dd;��d<d=i�Zd>�d?D��Zd@dAdBdCge�RdDdEdFdGdHdIdJ�ZdKdLdMdNdOdPdQdRdSdTdUdVdVdWdWdX�Ze���D]1\ZZ	e	D])Z
e�e
e��ZeevredYzezZeee
<�*�2[[	[
[idZd[�dRd\�d]d^�d_d`�dadb�dcdd�dedf�dgdh�didj�dkdl�dmdn�dodp�dqdr�dsdt�dudv�dwdZ�dxdZ�idydz�dOd{�d|d}�d~d�d�d��d�d#�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��dSd��d�d��d�dk�d�d��d�d��d�d��dnd��d�d���id�d��d�d��d�d��d�d��dLd��d�d��d�d��d�d“d�dēd+dœddƓd�d	�d�dɓd�d˓d�d�d�d6�d�d#��dd�d�d�d�dӜ�Zd�dՄZ
edք��Zedׄ��Zd؄Ze��ZefdلZdڄZdۄZd܄Zd݄Zd�d�Zd�Zd�Zd�Zd�d�Zd�d�Zd�Zd�d�Z d�S)��Helper�FalserK�None�True�and�BOOLEAN�as�with�assert)rrK�async)r rK�await)r!rK�break)r"�	while for�class)r$zCLASSES SPECIALMETHODS�continue)r%r#�def)�functionrK�del)r(�BASICMETHODS�elif�if�else)r,r#�except�try�finally�for)r0zbreak continue while�from�import�global)r3znonlocal NAMESPACES)r+�
TRUTHVALUE)r2�MODULES�in)r6�SEQUENCEMETHODS�is�
COMPARISON�lambda)r:rm�nonlocal)r;zglobal NAMESPACES�not�or�pass)r>rK�raise)r?�
EXCEPTIONS�return)rArm)r.r@�while)rBzbreak continue if TRUTHVALUE)rz CONTEXTMANAGERS EXCEPTIONS yield�yield)rCrKc�"�g|]}dD]}||z���
S)��'r�r�)r��pr�s   rr�zHelper.<listcomp>?s)��L�L�L�a��L�L�A�A��E�L�L�L�Lr)r��frS�urFz'''r�r�)�+r�*�**r&z//�%�<<�>>rC�|�^�~rDrE�<=�>=�==�!=�<>)rDrErSrTrUrVrW)rrR)z+=z-=z*=z/=z%=z&=z|=z^=z<<=z>>=z**=z//=)rNrOrCrPrQrR)�j�J)�STRINGS�	OPERATORSr9�UNARY�AUGMENTEDASSIGNMENT�BITWISE�COMPLEXzOPERATORS FORMATTING�POWERzTUPLES LISTS FUNCTIONSz ATTRIBUTES FLOAT MODULES OBJECTS�ELLIPSISzSLICINGS DICTIONARYLITERALSz	def classrZ�PRIVATENAMESzPRIVATENAMES SPECIALMETHODS�
BACKQUOTESzTUPLES FUNCTIONS CALLSzLISTS SUBSCRIPTS SLICINGS)rMrL�,rrk�:�@r�r�r��`r�r��[�]r�TYPES)�typeszRSTRINGS UNICODE NUMBERS SEQUENCES MAPPINGS FUNCTIONS CLASSES MODULES FILES inspect)�stringsz4str UNICODE SEQUENCES STRINGMETHODS FORMATTING TYPES�
STRINGMETHODS)zstring-methodszSTRINGS FORMATTING�
FORMATTING)�
formatstringsr[�UNICODE)rlz:encodings unicode SEQUENCES STRINGMETHODS FORMATTING TYPES�NUMBERS)�numberszINTEGER FLOAT COMPLEX TYPES�INTEGER)�integersz	int range�FLOAT)�floatingz
float mathr_)�	imaginaryz
complex cmath�	SEQUENCES)�typesseqz$STRINGMETHODS FORMATTING range LISTS�MAPPINGS�DICTIONARIESrm)�typesfunctionsz	def TYPES�METHODS)�typesmethodszclass def CLASSES TYPES�CODEOBJECTS)zbltin-code-objectszcompile FUNCTIONS TYPES�TYPEOBJECTS)zbltin-type-objectsztypes TYPES�FRAMEOBJECTS�
TRACEBACKS�NONE)zbltin-null-objectrK)zbltin-ellipsis-object�SLICINGS�SPECIALATTRIBUTES)�specialattrsrKrl)rkz!class SPECIALMETHODS PRIVATENAMESr5)�typesmodulesr2�PACKAGES�EXPRESSIONS)zoperator-summaryz�lambda or and not in is BOOLEAN COMPARISON BITWISE SHIFTING BINARY FORMATTING POWER UNARY ATTRIBUTES SUBSCRIPTS SLICINGS CALLS TUPLES LISTS DICTIONARIESr[�
PRECEDENCE�OBJECTS)�objectsrj�SPECIALMETHODS)�specialnameszbBASICMETHODS ATTRIBUTEMETHODS CALLABLEMETHODS SEQUENCEMETHODS MAPPINGMETHODS NUMBERMETHODS CLASSESr))�
customizationzhash repr str SPECIALMETHODS�ATTRIBUTEMETHODS)zattribute-accesszATTRIBUTES SPECIALMETHODS�CALLABLEMETHODS)zcallable-typeszCALLS SPECIALMETHODSr7)�sequence-typesz(SEQUENCES SEQUENCEMETHODS SPECIALMETHODS�MAPPINGMETHODS)r�zMAPPINGS SPECIALMETHODS�
NUMBERMETHODS)z
numeric-typesz*NUMBERS AUGMENTEDASSIGNMENT SPECIALMETHODS�	EXECUTION)�	execmodelz%NAMESPACES DYNAMICFEATURES EXCEPTIONS�
NAMESPACES)�namingz3global nonlocal ASSIGNMENT DELETION DYNAMICFEATURES�DYNAMICFEATURES)zdynamic-featuresrK�SCOPING�FRAMESr@)rztry except finally raise�CONVERSIONS)�conversionsrK�IDENTIFIERS)�identifierszkeywords SPECIALIDENTIFIERS�SPECIALIDENTIFIERS)z
id-classesrK)zatom-identifiersrK�LITERALS)z
atom-literalsz=STRINGS NUMBERS TUPLELITERALS LISTLITERALS DICTIONARYLITERALS�TUPLES�
TUPLELITERALS)�	exprlistszTUPLES LITERALS�LISTS)ztypesseq-mutable�LISTLITERALSr�)�listszLISTS LITERALS)�typesmapping�DICTIONARYLITERALSr�)r5zDICTIONARIES LITERALS�
ATTRIBUTES)zattribute-referencesz(getattr hasattr setattr ATTRIBUTEMETHODS�
SUBSCRIPTS)�
subscriptionsr7r�)�slicingsr7�CALLS)�callsr�)�powerr�r\)�unaryr��BINARY)�binaryr��SHIFTING)�shiftingr�r^)�bitwiser�)�comparisonszEXPRESSIONS BASICMETHODS)�booleanszEXPRESSIONS TRUTHVALUE�	ASSERTION�
ASSIGNMENT)�
assignmentr]r])�	augassignr��DELETION�	RETURNING�	IMPORTING)�compoundzfor while break continue)�truthz if while and or not BASICMETHODS)�debugger�pdb)zcontext-managersr)�CONDITIONAL�LOOPINGr4�	DEBUGGING�CONTEXTMANAGERSNc�"�||_||_dSr�)�_input�_output)r:�inputrs   rr�zHelper.__init__�s���������rc�(�|jptjSr�)r�r	r�r@s rr�zHelper.input�s���{�'�c�i�'rc�(�|jptjSr�)r�r	r�r@s rrz
Helper.output�s���|�)�s�z�)rc��tj��dddkr|��dSd|jj�d|jj�d�S)NrTrj�?rKrDrz
 instance>)r�stackr+rrr@s r�__repr__zHelper.__repr__�s\���=�?�?�1��a� �C�'�'��D�F�F�F��2�(�&*�^�%>�%>�%>�%)�^�%@�%@�%@�B�	Brc�6�||jurM	|�|��dS#t$r(}|j�|�d���Yd}~dSd}~wwxYw|���|���|j�d��dS)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.
)�_GoInteractiverrrr��intro�interact)r:�request�es   r�__call__zHelper.__call__�s����$�-�-�-�
,��	�	�'�"�"�"�"�"���
,�
,�
,���!�!�Q�(�(�(�+�+�+�+�+�+�+�+�+�����
,����
�J�J�L�L�L��M�M�O�O�O��K����
�
�
�
�
s�"�
A�A�Ac���|j�d��		|�d��}|sdSn#ttf$rYdSwxYw|���}t
|��dkr6|d|dcxkrdvrnn|d|dd�vr
|dd�}|���d	vrdS|d
kr|���n|�	|����)NrSTzhelp> rUrrrErT)r��quitr)
rr��getliner��EOFErrorrVrWr+r�r�r:r�s  rr�zHelper.interact�s������$����	#�
��,�,�x�0�0���%���%��%�x�0�
�
�
����
�����m�m�o�o�G��G���q� � �W�Q�Z�7�2�;�%L�%L�%L�%L�*�%L�%L�%L�%L�%L���
�'�!�B�$�-�7�7�!�!�B�$�-���}�}���-�/�/����&� � ��
�
������	�	�'�"�"�"�#	#s�7�A�Ac���|jtjurt|��S|j�|��|j���|j���S)z.Read one line, using input() when appropriate.)r�r	r�rr�r�r�)r:�prompts  rr�zHelper.getline�s[���:���"�"���=�=� ��K���f�%�%�%��K�������:�&�&�(�(�(rc���t|��td��u�rv|���}|dkr|����n}|dkr|����na|dkr|����nE|dkr|����n)|dd�dkr.|�|���d��n�||jvr|�|��n�|d	vrtt|��d
��n�||jvr|�|��n�||j
vr|�|��nn|rt|d
|j���nTttd
|j���n7t!|t"��r|��nt|d
|j���|j�d��dS)
NrK�keywords�symbols�topicsr�zmodules rT)rrrzHelp on %s:)rrS)rCrV�listkeywords�listsymbols�
listtopics�listmodulesrr��
showsymbolr=�evalr��	showtopicr�r�rDr.rrr�r�s  rrzHelper.help�s�����=�=�D��H�H�$�$��m�m�o�o�G��*�$�$�d�&7�&7�&9�&9�&9�&9��I�%�%�t�'7�'7�'9�'9�'9�'9��H�$�$�d�o�o�&7�&7�&7�&7��I�%�%�t�'7�'7�'9�'9�'9�'9���!���
�*�*�� � �������!3�4�4�4�4��D�L�(�(�$�/�/�'�*B�*B�*B�*B��5�5�5��D��M�M�=�1�1�1�1��D�M�)�)�4�>�>�'�+B�+B�+B�+B��D�K�'�'�����)@�)@�)@�)@��
?�#�g�}�T�\�J�J�J�J�J��c�=���>�>�>�>�>�
���
(�
(�	?�$�$�&�&�&�&��'�=���>�>�>�>�����$�����rc��|j�d�dtjdd�z����dS)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)rr�r*r	r/r@s rr�zHelper.introsK��������F�7�S�%�b�q�b�)�)�*�*�	,�	,�	,�	,�	,rr��Pc���tt|����}||z}t|��|zdz
|z}t|��D]�}t|��D]}||z|z}|t|��krb|j�||��||dz
kr9|j�dd|dz
t||��z
zz����|j�d����dS)NrTrrS)rzr�rWryrr�)	r:�items�columnsrl�colwr{�rowr|r�s	         rrzzHelper.list#s���V�E�]�]�#�#�������E�
�
�W�$�q�(�W�4����;�;�	$�	$�C��W�~�~�
R�
R���$�J��$���s�5�z�z�>�>��K�%�%�e�A�h�/�/�/��W�q�[�(�(���)�)�#��t�a�x�#�e�A�h�-�-�7O�0P�*P�Q�Q�Q���K���d�#�#�#�#�	$�	$rc��|j�d��|�|j�����dS)NzN
Here is a list of the Python keywords.  Enter any keyword to get more help.

)rr�rzr�r~r@s rr�zHelper.listkeywords0sI�������	�	�	�	
�	�	�$�-�$�$�&�&�'�'�'�'�'rc��|j�d��|�|j�����dS)Nzx
Here is a list of the punctuation symbols which Python assigns special meaning
to. Enter any symbol to get more help.

)rr�rzr�r~r@s rr�zHelper.listsymbols7sI�������	�	�	�
	
�	�	�$�,�#�#�%�%�&�&�&�&�&rc��|j�d��|�|j�����dS)NzN
Here is a list of available topics.  Enter any topic name to get more help.

)rr�rzr�r~r@s rr�zHelper.listtopics?sI�������	�	�	�	
�	�	�$�+�"�"�$�$�%�%�%�%�%rc�f�	ddl}n+#t$r|j�d��YdSwxYw|j�||j�|����}|s,|j�dt|��z��dSt|��td��ur|�	||��S|\}}	|jj|}n;#t$r.|j�dt|��z��YdSwxYw|���dz}|r
|pddz|z}|rbddl}dd�
|�����zdz}	|�|	d	��}
|d
d�
|
��zz
}t!|��dS)Nr�t
Sorry, topic and keyword documentation is not available because the
module "pydoc_data.topics" could not be found.
zno documentation found for %s
rKrSr�Related help topics: r��Hz
%s
)�pydoc_data.topicsrrr�r�rr�rrCr��KeyErrorrV�textwraprXr�wrapr�)r:�topic�
more_xrefs�
pydoc_data�target�label�xrefsr=r�rf�wrapped_texts           rr�zHelper.showtopicFs���	�$�$�$�$�$���	�	�	��K����
�
�
�
�F�F�	����������
�(9�(9�%�(@�(@�A�A���	��K���?�$�u�+�+�M�N�N�N��F���<�<�4��8�8�#�#��>�>�&�*�5�5�5����u�	��#�*�5�1�C�C���	�	�	��K���?�$�u�+�+�M�N�N�N��F�F�	�����i�i�k�k�D� ���	5��[�b�C�'�*�4�E��	6��O�O�O�*�T�Y�Y�u�{�{�}�}�-E�-E�E��L�D�#�=�=��r�2�2�L��8�d�i�i��5�5�5�5�C�
�c�
�
�
�
�
s��$/�/�
C � 4D�Dc�\�	ddl}n#t$rYdSwxYw|j�||j�|����}|std���t
|t��r|�||��S|\}}|jj|}|r
|pddz|z}||fS)a*Return unbuffered tuple of (topic, xrefs).

        If an error occurs here, the exception is caught and displayed by
        the url handler.

        This function duplicates the showtopic method but returns its
        result directly so it can be formatted for display in an html page.
        rN)r�rKzcould not find topicrKr)	r�rr�rr�r&r.rD�	_gettopic)r:r�r�rrrrr=s        rrzHelper._gettopicfs���	
�$�$�$�$�$���	
�	
�	
�
�
�
�	
����
������
�(9�(9�%�(@�(@�A�A���	5��3�4�4�4��f�c�"�"�	6��>�>�&�*�5�5�5����u���&�u�-���	5��[�b�C�'�*�4�E��E�z�s��
�c�~�|j|}|�d��\}}}|�||��dS)Nr)r��	partitionr�)r:�symbolrr�r�rs      rr�zHelper.showsymbol�sA����f�%�� �*�*�3�/�/���q�%����u�e�$�$�$�$�$rc���|r>|j�d�|����t|��dS|j�d��i}|fd���fd�}t	����|���|�|�����|j�d��dS)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|dd�dkr
|dd�dz}|�d��dkrd||<dSdS)N����	.__init__rirrrT)�find)r
r\rxrs    r�callbackz$Helper.listmodules.<locals>.callback�s]���:�w�r�s�s�|�{�:�:�%�c�r�c�l�\�9�G��<�<��$�$�q�(�(�'(�G�G�$�$�$�)�(rc�"���d|d��dSr�r�)r\rs �r�onerrorz#Helper.listmodules.<locals>.onerror�s������w��-�-�-�-�-r�rz�
Enter any module name to get more help.  Or, type "modules spam" to search
for modules whose name or summary contain the string "spam".
)rr�r*�apropos�
ModuleScanner�runrzr~)r:r�rrrs    @rr�zHelper.listmodules�s�����	��K�����F�3�K�K�	
�
�
�

�C�L�L�L�L�L��K����
�
�
��G�6=�
)�
)�
)�
)�

.�
.�
.�
.�
.��O�O����'��:�:�:��I�I�g�l�l�n�n�%�%�%��K����
�
�
�
�
rr�)r�r�rM)!r)rrr��_strprefixes�_symbols_inverser�r�r��symbols_r	rr�r�r/r�rr�rAr�r�r�r�rr�rzr�r�r�r�rr�r�r�rrrrs�������$���$���$�	��$�	�y�	$�
	
�f�$�	�.�
$�	��$�	��$�	�'�$�	�4�$�	�-�$�	��$�	�&�$�	��$�	�%�$� 	�%�!$�"	�5�#$�$�$	�.�%$�&	��'$�(	�3�)$�*	
�"�+$�,	�'�-$�.	
�'�/$�0	
�l�1$�2	�)�3$�4	�5�5$�6	�y�7$�8	
�i�9$�:	��;$�<	�(�=$�>	�)�?$�@	�$�A$�B	�:�C$�D	�<�E$�$�F	��G$�$�H�NM�L�#7�L�L�L�L��%��e�;�l�;�;�N�?��!B�4��
�
��$��
%�
/��
*�
��
�+�
�
%�
%�
(�
(���G�",�1�1�3�3�%�%���x��	%�	%�F��[�[���/�/�F��F�"�"��#���-��$�G�F�O�O�		%�
	�x���U��=�U�	�(�U�
	�A�U�	�4�
U�	�(�U�	�=�U�	�,�U�	�+�U�	�1�U�	�I�U�	�N�U�	�4�U� 	�>�!U�"	�H�#U�$	�<�%U�&	��'U�(	�g�)U�U�*	�)�+U�,	�9�-U�.	�1�/U�0	�A�1U�2	�-�3U�4	�H�5U�6	�.�7U�>	�]�?U�@	�m�AU�B	�'�CU�D	�4�EU�J	�I�KU�L	�M�MU�N	�E�OU�P	�/�QU�T	�G�UU�V	�,�WU�U�U�Z	�K�[U�\	�W�]U�^	�3�_U�`	�<�aU�b	�,�cU�d	�@�eU�f	�*�gU�h	�E�iU�j	�0�kU�l	�0�mU�n	�8�oU�r	�+�sU�t	�9�uU�v	�5�wU�x	�3�yU�z	�>�{U�|	�?�}U�U�U�~	�Z�U�@	�:�AU�B	�3�CU�D	�)�EU�F	�)�GU�H	�)�IU�J	�+�KU�L	�/�MU�N	�-�OU�P	�A�QU�R	�9�SU�T	�X�UU�V	�;�WU�X	�=�YU�Z	�E�[U�\	�X�]U�^	�X�_U�U�`�;�C�(�7�iU�U�U�F�n�����(�(��X�(��*�*��X�*�B�B�B��V�X�X�N�-����� #�#�#�*)�)�)� � � �*,�,�,�"$�$�$�$�(�(�(�'�'�'�&�&�&�����@����6%�%�%�
�����rrc��eZdZdZdd�ZdS)rz7An interruptible scanner that searches module synopses.Nc���|r|���}d|_i}tjD]�}|dkr�d||<|�|d|d���t	|��jpd}|�d��d}|dz|z}|����|��dkr
|d||����tj	|���D�]�\}	}}
|jr�n�|�|d|d���!	tj
|	|��}n#t$rY�DwxYw|j}t|d	��r�	|�|��}
n#t$r|r||��Y��wxYwt!t#j|
����pd}t|d
��r|�|��}n{d}nx	t(j�|��}n#t.$r|r||��Y��wxYw|jr|j���dnd}t3|dd��}|dz|z}|����|��dkr
||||�����|r|��dSdS)NF�__main__rTrKrSrr�r�
get_source�get_filenamer�)r+r�r	rrr@rrr�r�	_get_specrr�r�rr�r�r��StringIOrr�r�r�rr�r)r:rr��	completerr�seenr\r#rxr�r�r�r��sourcer
r�s                rrzModuleScanner.run�s���!�c�i�i�k�k����	����/�
	6�
	6�G��*�$�$� !��W�
��;��H�T�7�B�/�/�/�/�%�g�.�.�6�<�"�D��:�:�d�+�+�A�.�D�"�U�?�T�1�D��z�z�|�|�(�(��-�-��2�2� ���w��5�5�5��(/�(=�g�(N�(N�(N�$	2�$	2�$�H�g�u��y�
����{����w��+�+�+�+��"�,�X�w�?�?�D�D��"�����H���������6�<�0�0�;�!�!'�!2�!2�7�!;�!;����$�!�!�!�"�-�#�G�G�,�,�,� ��!����+�2�;�v�+>�+>�?�?�E�2�D��v�~�6�6�$�%�2�2�7�;�;���#���!�!*�!5�!;�!;�D�!A�!A����&�!�!�!�"�-�#�G�G�,�,�,� ��!����>D�^�S�6�>�4�4�6�6�q�9�9�QS�D�"�6�*�T�:�:�D�����-���:�:�<�<�$�$�S�)�)�Q�.�.��H�T�7�D�1�1�1���	��I�K�K�K�K�K�	�	s6�2D�
D�D�0E�E �E �0G�G+�*G+rN)r)rrr@rr�rrrr�s.������A�A�8�8�8�8�8�8rrc���d�}d�}tj��5tjd��t���|||���ddd��dS#1swxYwYdS)zAPrint all the one-line module summaries that contain a substring.c�f�|dd�dkr
|dd�dz}t||od|z��dS�Nrr
riz- )r)r
r\rxs   rrzapropos.<locals>.callback�sF���2�3�3�<�;�&�&��c�r�c�l�\�1�G�
�g�t�+��t��,�,�,�,�,rc��dSr�r��r\s rrzapropos.<locals>.onerror�s���r�ignorerN)�warnings�catch_warnings�filterwarningsrr)r�rrs   rrr�s���-�-�-�
�
�
�	�	 �	"�	"�<�<����)�)�)������H�c�7��;�;�;�<�<�<�<�<�<�<�<�<�<�<�<����<�<�<�<�<�<s�9A � A$�'A$c�j�����	�
�ddl�ddl�ddl�	ddl�
Gd�d�jj���G�	fd�d�jj���G�����
fd�d�
j��}||||��}|���|j	s)|j
s"tjd	��|j	s|j
�"|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
   rNc��eZdZd�Zd�ZdS)�!_start_server.<locals>.DocHandlerc�T�|j�d��rd}nd}|�d��|�dd|z��|���|j�|�|j|���d����dS)	z�Process a request from an HTML browser.

            The URL received is in self.path.
            Get an HTML page from self.urlhandler and send it.
            z.css�text/css�	text/html��zContent-Typez%s; charset=UTF-8r�N)	r
r��
send_response�send_header�end_headers�wfiler��
urlhandlerr�)r:�content_types  r�do_GETz(_start_server.<locals>.DocHandler.do_GET.	s����y�!�!�&�)�)�
+�)���*�����s�#�#�#����^�-@�<�-O�P�P�P��������J���T�_�_��	�<�)�)�)/�����
:�
:�
:�
:�
:rc��dSr�r�)r:rs  r�log_messagez-_start_server.<locals>.DocHandler.log_message>	s���DrN)r)rrr9r;r�rr�
DocHandlerr.,	s2������	:�	:�	:� 	�	�	�	�	rr<c�&��eZdZd�Z�fd�Zd�ZdS)� _start_server.<locals>.DocServerc��||_|j|f|_||_|j�||j|j��d|_dS�NF)�host�addressrr<r��handlerr�)r:rA�portrs    rr�z)_start_server.<locals>.DocServer.__init__D	sG���D�I� �I�t�,�D�L�$�D�M��I���t�T�\�4�<�@�@�@��D�I�I�Irc����|jsQ��|j���gggd��\}}}|r|���|j�Q|���dSry)r��select�socketr��handle_request�server_close)r:�rd�wr�exrFs    �r�serve_until_quitz1_start_server.<locals>.DocServer.serve_until_quitK	s{����i�
*�#�]�]�D�K�,>�,>�,@�,@�+A�2�r�1�M�M�
��B���*��'�'�)�)�)��i�
*�
�������rc�v�|j�|��|jr|�|��dSdSr�)r<�server_activaterr@s rrOz0_start_server.<locals>.DocServer.server_activateR	sD���I�%�%�d�+�+�+��}�
$��
�
�d�#�#�#�#�#�
$�
$rN)r)rrr�rMrO)rFs�r�	DocServerr>B	sL�������	�	�	�	 �	 �	 �	 �	 �	$�	$�	$�	$�	$rrPc�6��eZdZ�fd�Z����fd�Zd�Zd�ZdS)�#_start_server.<locals>.ServerThreadc���||_||_t|��|_�j�|��d|_d|_dSr@)r7rAr�rD�Threadr��serving�error)r:r7rArD�	threadings    �rr�z,_start_server.<locals>.ServerThread.__init__Y	sG���(�D�O��D�I��D�	�	�D�I���%�%�d�+�+�+� �D�L��D�J�J�Jrc�:��	�jj�_��_�jj�_t|j���_�|j	|j
|j��}||_|�
��dS#t$r}||_Yd}~dSd}~wwxYw)zStart the server.N)�server�
HTTPServerr<rCr�Message�MessageClass�staticmethodr7rArD�ready�	docserverrMr�rV)r:�docsvrr�r<rP�email�https   ����rrz'_start_server.<locals>.ServerThread.runa	s����	
�!%��!7�	��$.�	�!�*/�-�*?�
�'�(4�T�_�(E�(E�
�%�"��4�9�d�i���D�D��!'����'�'�)�)�)�)�)���
�
�
���
�
�
�
�
�
�
�����
���s�A9A>�>
B�B�Bc�p�d|_|j|_|j|_d|j|jfz|_dS)NTz
http://%s:%d/)rUrA�server_portrDr�)r:rYs  rr^z)_start_server.<locals>.ServerThread.readyn	s5���D�L���D�I��*�D�I�&�$�)�T�Y�)?�?�D�H�H�Hrc�p�d|j_|���d|_d|_d|_dS)z&Stop the server and this thread nicelyTNF)r_r�rXrUr�r@s r�stopz(_start_server.<locals>.ServerThread.stopt	s4��"&�D�N���I�I�K�K�K�"�D�N� �D�L��D�H�H�HrN)r)rrr�rr^rf)r<rPrarbrWs�����r�ServerThreadrRW	sw�������	�	�	�	�	�	�	�	�	�	�	�	�	�	@�	@�	@�	�	�	�	�	rrgg{�G�z�?)
�http.server�
email.messagerFrWrY�BaseHTTPRequestHandlerrZrTr�rVrU�time�sleep)r7�hostnamerDrg�threadr<rPrarbrFrWs     @@@@@@r�
_start_serverro�sJ��������p���������M�M�M����������T�[�7����,$�$�$�$�$�$�$�D�K�*�$�$�$�*%�%�%�%�%�%�%�%�%�%�%�y�'�%�%�%�N�\�*�h��
5�
5�F�
�L�L�N�N�N��l��6�>���
�3�����l��6�>���Mrr1c����	�
���
���G�fd�dt��}|����fd���fd��
�fd��
�fd���fd���fd���fd	��	�fd
�����	�
��
��fd�}|�d��r
|d
d�}|dkr�tj�tj�t����}tj�||��}t|��5}d�|�	����cddd��S#1swxYwYn|dkr||��Std|�d|�����)aThe pydoc url handler for use with the pydoc server.

    If the content_type is 'text/css', the _pydoc.css style
    sheet is read and returned if it exits.

    If the content_type is 'text/html', then the result of
    get_html_page(url) is returned.
    c���eZdZ�fd�ZdS)�_url_handler.<locals>._HTMLDocc	�@��d}d|z}d|�d|�d����d|�d�	S)razpydoc_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:rbrc�css_path�css_link�html_navbars     �rrdz#_url_handler.<locals>._HTMLDoc.page�	sE���.�H�C���
�H��U�U�H�H�H�k�k�m�m�m�m�X�X�X�?�
?rN)r)rrrd)rvs�r�_HTMLDocrr�	s.�������
	?�
	?�
	?�
	?�
	?�
	?�
	?rrwc�����tj���dtj��d�dtj���d���}d|�d��tjd������d	�S)
Nz [rr�riz=
            <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>
            )rGr��python_version�python_build�python_compiler)r�rs �rrvz!_url_handler.<locals>.html_navbar�	s�����+�+�x�/F�/H�/H�/H�/H�/7�/D�/F�/F�q�/I�/I�/I�/7�/G�/I�/I�/I�/I�K�L�L���0�7�7�D�K�K��(9��(E�(E�(E�F�F�F�F�+H�	Hrc���d�}��d��}d�tjD��}��||��}|d��dd|��zg}i}tjD]+}|���||�����,|�d��dd	�|��fS)
zModule Index page.c��d|�d|�d�S�Nr�r�r�r��r#s r�	bltinlinkz3_url_handler.<locals>.html_index.<locals>.bltinlink�	����15���t�t�t�<�<rz/<strong class="title">Index of Modules</strong>c��g|]
}|dk�|��S)rr�)r�r#s  rr�z4_url_handler.<locals>.html_index.<locals>.<listcomp>�	s,��(�(�(�$��J�&�&��&�&�&rz<p>zBuilt-in Modulesr�zf<p align=right class="heading-text grey"><strong>pydoc</strong> by Ka-Ping Yee&lt;ping@lfw.org&gt;</p>zIndex of ModulesrK)	rhr	rr}rrr
rr�rX)r�rh�namesrcr!rrs      �r�
html_indexz _url_handler.<locals>.html_index�	s����	=�	=�	=��,�,�=�
�
��(�(�#�":�(�(�(���#�#�E�9�5�5���U�T�_�_����&3�&3�3�4�����8�	3�	3�C��O�O�D�J�J�s�D�1�1�2�2�2�2����
'�	(�	(�	(�"�2�7�7�8�#4�#4�4�4rc����	�g�	�	fd�}tj��5tjd��d�}t���|||���ddd��n#1swxYwYd�}g}�
�d��}�	D]&\}}|�||��|z���'|�
�d|zd	d
�|����z}d|fS)zSearch results page.c�v��|dd�dkr
|dd�dz}��||od|zf��dSr%r�)r
r\rx�
search_results   �rrz3_url_handler.<locals>.html_search.<locals>.callback�	sP����r�s�s�|�{�*�*�!�#�2�#�,��5��� � �'�4�+?�D�4�K�!@�A�A�A�A�Arr(c��dSr�r�r's rrz2_url_handler.<locals>.html_search.<locals>.onerror�	s���rrNc��d|�d|�d�Sr�r�r�s rr�z4_url_handler.<locals>.html_search.<locals>.bltinlink�	r�rz-<strong class="title">Search Results</strong>zkey = %sr�ryzSearch Results)	r)r*r+rrrhrrrrX)r�rrr�r�rhr#rxrcr�rs         @�r�html_searchz!_url_handler.<locals>.html_search�	s�����
�	B�	B�	B�	B�	B�
�
$�
&�
&�	@�	@��#�H�-�-�-�
�
�
��O�O����#�w��?�?�?�		@�	@�	@�	@�	@�	@�	@�	@�	@�	@�	@����	@�	@�	@�	@�	=�	=�	=����,�,�;�
�
��(�	3�	3�J�D�$��N�N�9�9�T�?�?�T�1�2�2�2�2��T�_�_����g�v�{�{�7�';�';�=�=�=����)�)s�<A%�%A)�,A)c����d�}��d��}ttj�����}��||��}|��dd|��z}d|fS)zIndex of topic texts available.c��d|�d|�d�S�Nz<a href="topic?key=r�r�r�r�s rr�z4_url_handler.<locals>.html_topics.<locals>.bltinlink�	����6:�d�d�D�D�D�A�Ar�$<strong class="title">INDEX</strong>�Topicsr�)rhr�rr�r~r}rr)r�rhr�rcrs    �r�html_topicsz!_url_handler.<locals>.html_topics�	s����	B�	B�	B��,�,�2�
�
���v�}�)�)�+�+�,�,���#�#�E�9�5�5���T�_�_��g�x�)�)�)����!�!rc������d��}ttj�����}d�}��||��}|��dd|��z}d|fS)zIndex of keywords.r�c��d|�d|�d�Sr�r�r�s rr�z6_url_handler.<locals>.html_keywords.<locals>.bltinlink
r�r�Keywordsr�)rhr�rr�r~r}rr)rhr�r�rcrs    �r�
html_keywordsz#_url_handler.<locals>.html_keywords
s�����,�,�2�
�
���v��+�+�-�-�.�.��	B�	B�	B��#�#�E�9�5�5���T�_�_����+�+�+���8�#�#rc���tj��}t||��}|�|��\}}||jvrd}nd}��d|z��}d��|��z}��|d|��}|rQt|�	����}d�}��
||��}��dd|��}|�d|��d	�|||f��fS)
zTopic or keyword help page.�KEYWORD�TOPICr�z
<pre>%s</pre>r�c��d|�d|�d�Sr�r�r�s rr�z7_url_handler.<locals>.html_topicpage.<locals>.bltinlink%
s���:>�$�$����E�Err�rrK)
r�rrrr�rhr�rrr�rr}rprX)	r��buf�htmlhelprcrrbrhr�rs	        �r�html_topicpagez$_url_handler.<locals>.html_topicpage
s!����k�m�m���#�s�#�#��"�,�,�U�3�3���%��H�%�%�%��E�E��E��,�,�/�%�7�
�
��#�T�[�[��%:�%:�:���?�?�5�7�H�=�=���	J��5�;�;�=�=�)�)�E�
F�
F�
F��$�$�U�I�6�6�E��L�L�!8�'�5�I�I�E� �5�5�%�%�(�����(�E�2�3�3�5�	5rc���t|d���}|�|dkrtd���t|��}��||��}||fS)NrT)rrzcould not find object)rr&r�r)r�r9rb�contentrs    �r�html_getobjz!_url_handler.<locals>.html_getobj-
sY����S�A�&�&�&���;�3�&�=�=��4�5�5�5���
�
���-�-��S�)�)���g�~�rc������d��}d��fd�tt|��|��D����}|��|d|��z}d|z|fS)Nz$<strong class="title">Error</strong>ryc3�B�K�|]}��|��V��dSr�)rG)r�r�rs  �rrKz3_url_handler.<locals>.html_error.<locals>.<genexpr>9
sG�����F�F�T�t�{�{�4�0�0�F�F�F�F�F�FrrVz
Error - %s)rhrXrrCrr)r�r�rhrcrs    �r�
html_errorz _url_handler.<locals>.html_error5
s�����,�,�2�
�
���;�;�F�F�F�F�4�T�#�Y�Y��D�D�F�F�F�F�F���T�_�_�S�'�8�D�D�D���c�!�8�+�+rc����|}|�d��r
|dd�}	|dvr�
��\}}n�|dkr���\}}n�|dkr���\}}n�d|vr�|�d��\}}}|dkr�|��\}}n�|d	kr.	�
|��\}}n�#t$r�	|��\}}YngwxYw|d
kr@|dvr�
��\}}nK	�	|��\}}n;#t$r�
|��\}}Yn!wxYwtd����	|��\}}n&#t$r}�||��\}}Yd}~nd}~wwxYw��||��S)zGenerate an HTML page for url.r'N���)rKr�r�r�r0z
search?keyz	topic?keyzget?keyz
bad pydoc url)r�rr&r�rd)r��complete_urlrbr��opr�r�rr�r�r�r�r�r�r�s       ��������r�
get_html_pagez#_url_handler.<locals>.get_html_page>
s������<�<�� � �	��c�r�c�(�C� 	;��m�#�#�!+������w�w�����!,������w�w��
�"�"�!.������w�w����� �]�]�3�/�/�
��A�s���%�%�%0�[��%5�%5�N�E�7�7��;�&�&�:�)7���)<�)<���w�w��%�:�:�:�)4��S�)9�)9���w�w�w�:�����9�_�_��m�+�+�)3������w�w�A�-8�[��-=�-=�N�E�7�7��)�A�A�A�-;�^�C�-@�-@�N�E�7�7�7�A����%�_�5�5�5�!,��S�!1�!1���w����	;�	;�	;�'�Z��c�:�:�N�E�7�7�7�7�7�7�����	;�����y�y���(�(�(s`�A2D(�B&�%D(�&C�>D(�C�D(�C,�+D(�,D�D(�D� D(�(
E�2E�Er&rTNr0rKr1zunknown content type z	 for url )r_r�rr
�dirname�realpathr�rXr��	readlinesrG)r�r8rwr��	path_herert�fprr�r�r�r�rvr�r�r�s       @@@@@@@@@r�_url_handlerr��	sq�����������?�?�?�?�?�?�?�7�?�?�?�$�8�:�:�D�H�H�H�H�H�65�5�5�5�5�0*�*�*�*�*�<"�"�"�"�"� 
$�
$�
$�
$�
$�5�5�5�5�5�2�����,�,�,�,�,�&)�&)�&)�&)�&)�&)�&)�&)�&)�&)�&)�&)�P�~�~�c�����!�"�"�g���z�!�!��G�O�O�B�G�$4�$4�X�$>�$>�?�?�	��7�<�<�	�3�/�/��
�(�^�^�	+�r��7�7�2�<�<�>�>�*�*�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+����	+�	+�	+�	+�	+�	��	$�	$��}�S�!�!�!�
�)�L�L�L�#�#�N�
O�
O�Os�2'D&�&D*�-D*T�	localhost)�open_browserrmc���ddl}tt||��}|jrt	|j��dS|j�r/d}|r|�|j��	t	d|j��t	|��|jratd��}|�	��}|dkrn7|dkr|�|j��nt	|��|j�an%#ttf$rt	��YnwxYw|jr%|���t	d��dSdS#|jr$|���t	d��wwxYwdS)	z�Start 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> r�r�zServer stopped)
�
webbrowserror�rVrrUr�r�r�r+r�r�rf)rDr�rmr��serverthread�server_help_msgr�s       r�browser�s
s������� ��x��>�>�L����
�l� �!�!�!�����(�>���	.��O�O�L�,�-�-�-�	(��#�\�%5�6�6�6��/�"�"�"��&�
+��J�'�'���i�i�k�k���#�:�:���C�Z�Z��O�O�L�$4�5�5�5�5��/�*�*�*��&�
+���"�8�,�	�	�	��G�G�G�G�G�	�����#�
(��!�!�#�#�#��&�'�'�'�'�'�
(�
(��|�#�
(��!�!�#�#�#��&�'�'�'�'�
(����'(�(s+�BC,�+D?�,D�D?�
D�D?�?-E,c�r�t|t��o"|�tj��dkSr�)r.rDrr�sep)r�s r�ispathr��
s(���a����5�!�&�&���.�.�A�"5�5rc���d|vs#tj|vstj��|vrdStj�t
��}tj�|��}|���}||vr5tj�||��s|�|��|�	dtj����|S)z�Ensures current directory is on returned path, and argv0 directory is not

    Exception: argv0 dir is left alone if it's also pydoc's directory.

    Returns a new path entry list, or None if no adjustment is needed.
    rKNr)
r�curdir�getcwdr
r�r��copy�samefile�remove�insert)�
given_path�argv0�
stdlib_dir�
script_dir�revised_paths     r�_get_revised_pathr��
s���
�Z���2�9�
�2�2�b�i�k�k�Z�6O�6O��t������*�*�J������'�'�J��?�?�$�$�L��Z�����(8�(8��Z�(P�(P�����J�'�'�'�����2�9�;�;�'�'�'��rc��ttjtjd��}|�|tjdd�<dSdS)z�Ensures 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)r�r	r
�argv)r�s r�_adjust_cli_sys_pathr��
s<��
%�S�X�s�x��{�;�;�L���"��������� �rc�,�ddl}Gd�dt��}t��	|�tjdd�d��\}}d}d}d}d}d}|D]C\}	}
|	d	krd
}d
}|	dkrt|
��dS|	dkrd
}|
}|	d
krd
}|	dkrd
}|
}�D|rt
|||���dS|s|�|D�]A}t|��rEtj	�
|��s&td|z��tjd��	t|��r.tj	�
|��rt|��}|rNt|��r/tj	�|��rt!|��n*t#|��nt$�|����#t&t(f$r.}t|��tjd��Yd}~��;d}~wwxYwdS#|j|f$r�tj	�tj	�tjd����d}
td�|
tj�����YdSwxYw)z@Command-line interface (looks at sys.argv to decide what to do).rNc��eZdZdS)�cli.<locals>.BadUsageN)r)rrr�rr�BadUsager��
s�������rr�rTzbk:n:p:wFr�z-bTz-kz-pz-wz-n)rmr�zfile %r does not exista�pydoc - 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.
)r�r�)�getoptr�r�r	r�rr�r�rr
�existsr�exitr�r�rrrrrr�rVr�r�r*r�)r�r��optsr�writing�start_serverr�rDrm�opt�val�argr�r�s              r�clir��
s����M�M�M�#�#�#�#�#�9�#�#�#�����M!��]�]�3�8�A�B�B�<��<�<�
��d������������	�	�H�C���d�{�{�#��#���d�{�{����������d�{�{�#�����d�{�{����d�{�{�#������	��4�(��F�F�F�F��F��#�8�^��	�	�C��c�{�{�
�2�7�>�>�#�#6�#6�
��.��4�5�5�5�������
��#�;�;�*�2�7�>�>�#�#6�#6�*�$�S�/�/�C��#��c�{�{�&�r�w�}�}�S�'9�'9�&�!�#����� ��
�
�
�
��I�I�c�N�N�N����!2�3�
�
�
��e�������������������
����	�	��$
�L�(�#�!�!�!��g���r�w�/�/�����<�<�=�=�a�@��
��:�F�s���F���;	!�	!�	!�	!�	!�	!�!���sK�AH�1H�8AH�B'F?�=H�?G>�#G9�3H�9G>�>H�BJ�Jrr�)r)rrN)rKN)r1)br@r�r�r�r�r�r$�importlib._bootstrapr��importlib._bootstrap_external�importlib.machinery�importlib.utilrr�rr�r�rMr	r1rkr��urllib.parser�r)�collectionsr�reprlibr�	tracebackrrr$r>r7rIrQrZr]rdrhrpr��
IGNORECASErrrtrwr}r�ru�all_feature_namesr�r�r�r�r�r�r�r�r�r�r	rr4r_rQrWr�r�r�r�r�r�r�r�r�r�rrfr
rrrr=rrrrrrror�r�r�r�r�r�r)r�rr�<module>r�st��%�%�L�(��
)�
�����������������$�$�$�$�������������	�	�	�	�	�	�	�	���������	�	�	�	�
�
�
�
���������������������������������+�+�+�+�+�+�

�
�
����1�1�1�f
�
�
�!�!�!� A�A�A�
 � � ����G�G�G��������b�j�5�r�}�E�E��(�(�(�

�
�
�������"��J�8�9�9��(�(�(�(�0	�	�	�
�
�
�������" �%�%�%�%�NK�K�K�K�K�	�K�K�K�6�6�6�$ !��,�,�,�,�`6�6�6�6�6�6�6�6�t(�(�(�(�(�t�(�(�(�Tn7�n7�n7�n7�n7�c�n7�n7�n7�d:�:�:�:�:�t�:�:�:�@@�@�@�@�@�c�@�@�@�D�����G�������"�"�"�H#�#�#����0
/�
/�
/�F�F�F�
*2�*2�*2�X2�2�2� � � �6����*�w�y�y���M�O�O�	��w�y�y��>�>�>�>�KL��C�C�C�C�6DE��E�E�E�E�#�#�#�#�����U�U�U�U�U�U�U�U�n�v�x�x��;�;�;�;�;�;�;�;�z
<�
<�
<�U�U�U�piP�iP�iP�iP�X (�4�+� (� (� (� (� (�J6�6�6����8#�#�#�T!�T!�T!�l�z����C�E�E�E�E�E��r

ZeroDay Forums Mini