Uname: Linux server.digisquadtech.com 4.18.0-553.100.1.el8_10.x86_64 #1 SMP Mon Feb 2 04:13:33 EST 2026 x86_64
User: 1091 (madhavfluid)
Group: 1090 (madhavfluid)
Disabled functions: NONE
Safe mode: On[ PHPinfo ]
//usr/lib64/python3.6///__pycache__      ( Reset | Go to )
File Name: pprint.cpython-36.opt-1.pyc
3

 \|Q
@sdZddlZddlZddlZddlZddlm    Z
dddddd    gZ d!d d ddZ d"d d ddZ ddZddZddZGdddZddZGdd    d    ZddZeeeeeeeeedhZddZd#ddZ ddZ!e"d kre dS)$a/Support to pretty-print lists, tuples, & dictionaries recursively.

Very simple, but useful, especially in debugging data structures.

Classes
-------

PrettyPrinter()
    Handle pretty-printing operations onto a stream using a configured
    set of formatting parameters.

Functions
---------

pformat()
    Format a Python object into a pretty-printed representation.

pprint()
    Pretty-print a Python object to a stream [default is sys.stdout].

saferepr()
    Generate a 'standard' repr()-like value, but protect against recursive
    data structures.

N)StringIOpprintpformat
isreadable isrecursivesaferepr PrettyPrinterPF)compactcCs t|||||d}|j|dS)zAPretty-print a Python object to a stream [default is sys.stdout].)streamindentwidthdepthr N)rr)objectr r rrr Zprinterr/usr/lib64/python3.6/pprint.pyr/scCst||||dj|S)z<Format a Python object into a pretty-printed representation.)r rrr )rr)rr rrr rrrr7scCst|idddS)z=Version of repr() which can handle recursive data structures.Nr)
_safe_repr)rrrrr<scCst|idddS)z4Determine if saferepr(object) is readable by eval().Nrr    )r)rrrrr@scCst|idddS)z8Determine if object requires a recursive representation.Nr)r)rrrrrDsc@s&eZdZdZdgZddZddZdS)    _safe_keyaUHelper function for key functions when sorting unorderable objects.

    The wrapped-object will fallback to a Py2.x style comparison for
    unorderable types (sorting first comparing the type name and then by
    the obj ids).  Does not work recursively, so dict.items() must have
    _safe_key applied to both the key and the value.

    objcCs
||_dS)N)r)selfrrrr__init__Tsz_safe_key.__init__c CsRy |j|jkStk
rLtt|jt|jftt|jt|jfkSXdS)N)r    TypeErrorstrtypeid)rotherrrr__lt__Ws
 z_safe_key.__lt__N)__name__
__module__ __qualname____doc__    __slots__rrrrrrrHsrcCst|dt|dfS)z&Helper function for comparing 2-tuplesrr    )r)trrr _safe_tuple^sr%c@seZdZd:ddddZdd    Zd
d Zd d ZddZddZiZ    ddZ
e
e    e j <ddZ e e    ejj <ddZee    ej <ddZee    ej <ddZee    ej <ee    ej <ddZee    ej <ddZee    ej <d d!Zee    ej <d"d#Zee    ejj <d$d%Z d&d'Z!d(d)Z"d*d+Z#d,d-Z$e$e    ej%j <d.d/Z&e&e    ej'j <d0d1Z(e(e    ej)j <d2d3Z*e*e    ej+j <d4d5Z,e,e    ej-j <d6d7Z.e.e    ej/j <d8d9Z0e0e    ej1j <dS);rr    r
NF)r cCs|t|}t|}|dkr td|dk    r8|dkr8td|sDtd||_||_||_|dk    rf||_ntj|_t||_    dS)aDHandle pretty printing operations onto a stream using a set of
        configured parameters.

        indent
            Number of spaces to indent for each level of nesting.

        width
            Attempted maximum number of columns in the output.

        depth
            The maximum depth to print out nested structures.

        stream
            The desired output stream.  If omitted (or false), the standard
            output stream available at construction will be used.

        compact
            If true, several items will be combined in one line.

        rzindent must be >= 0Nzdepth must be > 0zwidth must be != 0)
int
ValueError_depth_indent_per_level_width_stream_sysstdoutbool_compact)rr rrr r rrrrcszPrettyPrinter.__init__cCs&|j||jddid|jjddS)Nr
)_formatr+write)rrrrrrszPrettyPrinter.pprintcCs"t}|j||ddid|jS)Nr)    _StringIOr1getvalue)rrZsiorrrrszPrettyPrinter.pformatcCs|j|idddS)Nrr)format)rrrrrrszPrettyPrinter.isrecursivecCs |j|idd\}}}|o| S)Nr)r5)rrsreadable    recursiverrrrszPrettyPrinter.isreadablec     Cst|}||kr.|jt|d|_d|_dS|j|||}|j||}    t||    kr|jj    t
|j d}
|
dk    rd||<|
|||||||d||=dSt |t rd||<|j||||||d||=dS|j|dS)NTFr    )rr2
_recursion
_recursive    _readable_reprr*len    _dispatchgetr__repr__
isinstancedict _pprint_dict) rrr r     allowancecontextlevelobjidrep    max_widthprrrr1s, 
  zPrettyPrinter._formatc
Csj|j}|d|jdkr*||jddt|}|r^t|jtd}    |j|    |||d|||ddS)N{r     )key})r2r)r=sorteditemsr%_format_dict_items)
rrr r rDrErFr2ZlengthrPrrrrCs
zPrettyPrinter._pprint_dictcCslt|s|jt|dS|j}|j|jd|jt|j||t|jd|d|||jddS)N(r    ))r=r2repr    __class__rr1listrP)rrr r rDrErFclsrrr_pprint_ordered_dictsz"PrettyPrinter._pprint_ordered_dictcCs0|jd|j||||d|||jddS)N[r    ])r2 _format_items)rrr r rDrErFrrr _pprint_lists
zPrettyPrinter._pprint_listcCsH|jdt|dkrdnd}|j||||t||||j|dS)NrRr    z,)rS)r2r=r[)rrr r rDrErFendcharrrr _pprint_tuples

zPrettyPrinter._pprint_tuplec    Cst|s|jt|dS|j}|tkr8|jdd}n&|j|jdd}|t|jd7}t|td}|j||||t||||j|dS)NrKrNz({z})r    )rM)    r=r2rTrUsetrrOrr[)    rrr r rDrErFtypr]rrr _pprint_sets
 zPrettyPrinter._pprint_setcCs|j}t|s|t|dSg}|jd}    |dkrD|d7}|d7}|j|}
} xt|    D]\} } t| }| t|    dkr|
|8}
t||
kr|j|q\tjd| }|j    | }d}xtt|D]h\}}||}|t|dkr| t|    dkr||8}tt||kr&|r |jt||}q|}qW|r\|jt|q\Wt|dkr^||dS|dkrp|dx8t|D],\} }| dkr|dd|||qzW|dkr|d    dS)
NTr    z\S*\s*rRrr0rLrS)
r2r=rT
splitlinesr*    enumerateappendrefindallpop)rrr r rDrErFr2ZchunkslinesZ
max_width1rIilinerHpartsZ
max_width2currentjpart    candidaterrr _pprint_strsT 
    


zPrettyPrinter._pprint_strc Cs|j}t|dkr"|t|dS|dk}|rF|d7}|d7}|dd}    x:t||j||D]$}
||    ||
|    s^dd|}    q^W|r|ddS)Nr    rRrbr0rLrS)r2r=rT_wrap_bytes_reprr*) rrr r rDrErFr2ZparensdelimrHrrr _pprint_bytes's"  zPrettyPrinter._pprint_bytescCs>|j}|d|jt|||d|d||d|ddS)Nz
bytearray(
r    rS)r2rubytes)rrr r rDrErFr2rrr_pprint_bytearray<s
zPrettyPrinter._pprint_bytearraycCs8|jd|j|j||d|d|||jddS)Nz mappingproxy( r    rS)r2r1copy)rrr r rDrErFrrr_pprint_mappingproxyEs
z"PrettyPrinter._pprint_mappingproxycCs|j}||j7}dd|}t|d}    xrt|D]f\}
\} } |
|    k} |j| ||}|||d|j| ||t|d| r|nd||| s2||q2WdS)Nz,
rLr    z: r)r2r)r=rdr<r1)rrPr r rDrErFr2delimnlZ
last_indexrjrMentlastrHrrrrQMs
  
z PrettyPrinter._format_dict_itemscCsN|j}||j7}|jdkr,||jdddd|}d}    |j|d}
} t|} y t| } Wntk
rvdSXd}x|sH| }y t| } Wn(tk
rd}| |8} |
|8}
YnX|jr|j|||}t|d}|
|kr| }
|    r|}    |
|kr|
|8}
||    d}    ||q~||    |}    |j    ||||r<|nd||q~WdS)    Nr    rLz,
rbFTrz, )
r2r)r*iternext StopIterationr/r<r=r1)rrPr r rDrErFr2r|rtrrIitZnext_entr~r}rHwrrrr[^sN

    

 zPrettyPrinter._format_itemscCs4|j||j|j|\}}}|s&d|_|r0d|_|S)NFT)r5rzr(r;r:)rrrErFrTr7r8rrrr<s zPrettyPrinter._reprcCst||||S)zFormat object for a specific context, returning a string
        and flags indicating whether the representation is 'readable'
        and whether the object represents a recursive construct.
        )r)rrrE    maxlevelsrFrrrr5szPrettyPrinter.formatc    Cst|s|jt|dS|j|j||}|j}|t|jd7}|jd|j|d|f|j||||d|||jddS)Nr    z    %s(%s,
%srLrS)r=r2rTr<default_factoryrUrrC)    rrr r rDrErFZrdfrWrrr_pprint_default_dictsz"PrettyPrinter._pprint_default_dictc    Cst|s|jt|dS|j}|j|jd|jdkrN|j|jdd|j}|j|||t|jd|d|||jddS)Nz({r    rLrz}))r=r2rTrUrr) most_commonrQ)    rrr r rDrErFrWrPrrr_pprint_counters
zPrettyPrinter._pprint_counterc
Cst|js|jt|dS|j}|j|jd|t|jd7}xrt|jD]d\}}    |t|jdkr|j|    |||d|||jdqP|j|    ||d|||jdd|qPWdS)NrRr    rSz,
rL)r=mapsr2rTrUrrdr1)
rrr r rDrErFrWrjmrrr_pprint_chain_maps
 zPrettyPrinter._pprint_chain_mapc    Cst|s|jt|dS|j}|j|jd|t|jd7}|jd|jdkrz|j||||d|||jdn:|j|||d|||j|j||}|jdd||fdS)NrRr    rYrz])z],
%smaxlen=%s)rL)r=r2rTrUrmaxlenr[r<)    rrr r rDrErFrWZrmlrrr _pprint_deques

  zPrettyPrinter._pprint_dequecCs|j|j|||||ddS)Nr    )r1data)rrr r rDrErFrrr_pprint_user_dictszPrettyPrinter._pprint_user_dictcCs|j|j|||||ddS)Nr    )r1r)rrr r rDrErFrrr_pprint_user_listszPrettyPrinter._pprint_user_listcCs|j|j|||||ddS)Nr    )r1r)rrr r rDrErFrrr_pprint_user_stringsz!PrettyPrinter._pprint_user_string)r    r
NN)2rr r!rrrrrr1r>rCrBr@rX _collections OrderedDictr\rVr^tuplerar_    frozensetrqrrurwrx    bytearrayr{_typesMappingProxyTyperQr[r<r5r defaultdictrCounterrChainMaprdequerUserDictrUserListr
UserStringrrrrrbsZ&
 



1


 )          cCst|}|tkrt|ddfSt|dd}t|to<|tjkr8|sHdSt|}|rj||krjdd||kfS||krt|ddfSd||<d}d}g}    |    j    }
|d7}t
} t |j t d} xf| D]^\} }| | |||\}}}| ||||\}}}|
d||f|o
|o
|}|s|rd}qW||=d    d
j|    ||fSt|trP|tjksht|trd|tjkrdt|tr|s~dSd }n"t|dkrd }n|sdSd}t|}|r||kr|dd||kfS||krt|ddfSd||<d}d}g}    |    j    }
|d7}x>|D]6}t
||||\}}}|
||s:d}|rd}qW||=|d
j|    ||fSt|}||o~|jd dfS)NTFr@{}z{...}r    )rMz%s: %sz{%s}z, []z[%s]z(%s,)()z(%s)z...<)rTF)rTF)rTF)r_builtin_scalarsrTgetattr
issubclassrBr@rr9rerrOrPr%joinrVrr=
startswith)rrErrFr`rrGr7r8Z
componentsrerrPkvZkreprZ    kreadableZkrecurZvreprZ    vreadableZvrecurr5oZoreprZ    oreadableZorecurrHrrrrs|  
 


rcCsdt|jt|fS)Nz<Recursion on %s with id=%s>)rrr)rrrrr91sr9cCsddl}|dkr,dd ddgddd    fgd
}t}|j}t|idd|j}|j||j}td ||td ||dS)Nrstringr    rrr)iz _safe_repr:zpformat:)r    r)timerrrprint)rrrJZt1Zt2Zt3rrr
_perfcheck6s
rccsd}t|dd}xhtdt|dD]T}|||d}||}||krR||8}tt||krv|rpt|V|}q&|}q&W|rt|VdS)Nrrr)r=rangerT)rrrDrmr~rjrorprrrrsCs
rs__main__)Nr    r
N)r    r
N)N)#r" collectionsrrfsysr,typesriorr3__all__rrrrrrr%rrrrrwrr&floatcomplexr.rrr9rrsrrrrr<module>#s6 
 D


All system for education purposes only. For more tools: Telegram @jackleet

Mr.X Private Shell

Logo
-
New File | New Folder
Command
SQL