b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 172.67.192.52 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/pprint.pyo
Size9.98 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed20-Jun-2019 19:45
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc @sùdZddkZddkZddklZdddddd gZd
iZ e
Z e Z
eZdd d dd
�Zd d dd�Zd�Zd�Zd�Zd�Zd dd��YZd�Zd�Zdd�Zedjo e�ndS(s/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.

iÿÿÿÿN(tStringIOtpprinttpformatt
isreadablet isrecursivetsafereprt
PrettyPrinters, iiPc Cs2td|d|d|d|�}|i|�dS(sAPretty-print a Python object to a stream [default is sys.stdout].tstreamtindenttwidthtdepthN(RR(tobjectRRR R
tprinter((s/usr/lib64/python2.6/pprint.pyR4scCs"td|d|d|�i|�S(s<Format a Python object into a pretty-printed representation.RR R
(RR(R RR R
((s/usr/lib64/python2.6/pprint.pyR:scCst|hdd�dS(s=Version of repr() which can handle recursive data structures.iN(t
_safe_reprtNone(R ((s/usr/lib64/python2.6/pprint.pyR>scCst|hdd�dS(s4Determine if saferepr(object) is readable by eval().iiN(R
R(R ((s/usr/lib64/python2.6/pprint.pyRBscCst|hdd�dS(s8Determine if object requires a recursive representation.iiN(R
R(R ((s/usr/lib64/python2.6/pprint.pyRFscCsMti�ii�z/tiotiddt�nt|�SWdQXdS(Ntignores%comparing unequal types not supported( twarningstcatch_warningst__exit__t __enter__t_syst py3kwarningtfilterwarningstDeprecationWarningtsorted(titerable((s/usr/lib64/python2.6/pprint.pyt_sortedJs

  cBs\eZddd
d
d�Zd�Zd�Zd�Zd�Zd�Zd�Z d �Z
RS( iiPcCs]t|�}t|�}||_||_||_|dj o
||_n
ti|_dS(sòHandle 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.

N(tintt_deptht_indent_per_levelt_widthRt_streamRtstdout(tselfRR R
R((s/usr/lib64/python2.6/pprint.pyt__init__Rs     

cCs3|i||iddhd�|iid�dS(Nis
(t_formatRtwrite(R!R ((s/usr/lib64/python2.6/pprint.pyRqscCs/t�}|i||ddhd�|i�S(Ni(t _StringIOR#tgetvalue(R!R tsio((s/usr/lib64/python2.6/pprint.pyRus cCs|i|hdd�dS(Nii(tformat(R!R ((s/usr/lib64/python2.6/pprint.pyRzscCs-|i|hdd�\}}}|o| S(Ni(R((R!R tstreadablet recursive((s/usr/lib64/python2.6/pprint.pyR}s!c Cs3|d}t|�}||jo*|it|��t|_t|_dS|i|||d�}t|�} t |�|i
d||j}
|i} |i o||i jo| |�dSt | dd�} t| t�o­| tijo�| d�|idjo| |idd�nt |�}
|
oHd||<||i}t|i��}|d\}}|i|||�}| |�| d�|i|||t |�d|d||�|
djo�x�|dD]�\}}|i|||�}|
o| dd||f�n| d |�|i|||t |�d|d||�qåWn||i}||=n| d
�dSt| t�o| tijp`t| t�o| tijp@t| t�o| tijp t| t�o!| tijot |�}
t| t�o| d �d }n±t| t�o@|
p| d
�dS| d�d}t|�}|d7}nat| t�o@|
p| d�dS| d�d}t|�}|d7}n| d�d}|idjo |
o| |idd�n|
oÀd||<||i}|i|d|||d||�|
djo`x]|dD]M}|
o| dd|�n | d�|i||||d||�q~Wn||i}||=nt| t�o|
djo| d�n| |�dS| |�dS(Nit__repr__t{t is: is,
%s%s: s, %s: t}t[t]sset()sset([s])is frozenset()s frozenset([i
t(t)s,
s, t,(t_idR$t
_recursiontTruet
_recursivetFalset _readablet_reprt_typet_lenRRtgetattrRt
issubclasstdictR,RRtitemsR#tlistttupletsett frozenset(R!R RRt allowancetcontexttleveltobjidtrepttyptsepLinesR$trtlengthRAtkeytenttendchar((s/usr/lib64/python2.6/pprint.pyR#�s¶
 
   ! 
 
 




 
 
     



 

 




 

 
cCsV|i||i�|i|�\}}}|p
t|_n|o
t|_n|S(N(R(tcopyRR9R:R7R8(R!R RGRHtreprR*R+((s/usr/lib64/python2.6/pprint.pyR;äs

cCst||||�S(sÈFormat 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
(R!R RGt maxlevelsRH((s/usr/lib64/python2.6/pprint.pyR(ísN( t__name__t
__module__RR"RRRRR#R;R((((s/usr/lib64/python2.6/pprint.pyRQs     c c
Cskt|�}|tjoðdtijot|�ttfSd|jo$d|jod}hdd6}nd}hdd6}|i}t�}|i } xI|D]A}
|
i
�o| |
�q£| ||
t|
�dd!��q£Wd||i �|fttfSt |d d�} t|t�om| tijo]|pd
ttfSt|�} |o!||jod t| |jfS| |jot|�ttfSd|| <t}
t}g}|i}|d7}t}x�t|i��D]�\}}|||||�\}}}|||||�\}}}|d ||f�|
o |o|}
|p|o
t}qíqíW|| =d
t|�|
|fSt|t�o| tijp t|t�oy| tijoit|t�o|pdttfSd}n9t|�djo
d}n|pdttfSd}t|�} |o%||jo|dt| |jfS| |jot|�ttfSd|| <t}
t}g}|i}|d7}xX|D]P}t||||�\}}}||�|p
t}
n|o
t}qÎqÎW|| =|t|�|
|fSt|�}||o|id� tfS(Ntlocalet't"s\"s\'iiÿÿÿÿs%s%s%sR,s{}s{...}s%s: %ss{%s}s[]s[%s]s(%s,)s()s(%s)s...t<(R<tstrRtmodulesRSR7R9tgetR%R$tisalphaR&R>RR?R@R,R5R6tappendR
RRAt
_commajoinRBRCR=t
startswith( R RGRTRHRKtclosuretquotestqgetR'R$tcharRMRIR*R+t
componentsR_Rtktvtkreprt kreadabletkrecurtvreprt vreadabletvrecurR(totoreprt oreadabletorecurRJ((s/usr/lib64/python2.6/pprint.pyR
÷s� 

   
$!  

 
   

 

 


 cCsdt|�it|�fS(Ns<Recursion on %s with id=%s>(R<RUR5(R ((s/usr/lib64/python2.6/pprint.pyR6KscCsµddk}|djo1ddddghdd6d d
6fgd }nt�}|i�}t|hdd �|i�}|i|�|i�}d
G||GHdG||GHdS(Niÿÿÿÿtstringiiiiiiiii �is _safe_repr:spformat:(ii(ttimeRRR
R(R Rttptt1tt2tt3((s/usr/lib64/python2.6/pprint.pyt
_perfcheckPs 
1   
 
t__main__((t__doc__tsysRRt cStringIORR%t__all__tjoinR`tidR5tlenR=ttypeR<RRRRRRRRR
R6RyRU(((s/usr/lib64/python2.6/pprint.pyt<module>#s*        ¦ T