mò €š|o|i|ƒnt|i|||d|d|ƒdS(s7 Print a listing of the locals() in frame to file. t nonrecursivetfilterN( ttitletfiletwritet print_dicttframeRtindenttlevelsRR(RRRRRRR((R Rss s### Dump of global variables: c Cs>|o|i|ƒnt|i|||d|d|ƒdS(s8 Print a listing of the globals() in frame to file. RRN( RRRRRRRRRR(RRRRRRR((R R s tc Csœ|iƒ}|iƒt|ƒtjo|t }|id ƒnxQ|D]I\}} |d j o||ƒpqKq|n|o$yt |ƒ} Wq³d} q³Xn t|ƒ} yt | ƒ} Wn d} nXt| ƒtjo| t d} nt| ƒtjo| t d} n|o|id|| | fƒn|id|| | fƒ|djo+t| ||d|dd|d |ƒqKqKWd S( s™ Print dictionary to file. reprkeys=1 will print the items using repr() for keys as well. indent is prepended to all lines. levels indicates the number of recursion levels to be printed. filter may be given as callable taking the dictionary key as input. It should then return 1 for keys which should be displayed and 0 for ones which should be skipped. s...s...truncated...s*repr()-error*s%s %-15s = %s s%s.%-15s = %s is RRN(s...s...truncated...(tdicttitemstltsorttlent_DICT_LEN_LIMITtappendtktvRRtreprkeystreprtntstrtrt_NAME_LEN_LIMITt_VALUE_LEN_LIMITRRRRtprint_recursiveR( R!RRRR*RRR(R#R,R)R.((R Rs>           cCs£g} d} yt|ƒ}Wnttfj o dSnXx¾tt|t ƒƒD]§} y|| } WnPnXyt | ƒ} Wn d} nXt| ƒt jo| t d} n| i| | fƒt| ƒ|jpt| ƒdjo d} qRqRWt|ƒt jo| id ƒn| owxtt| ƒD]b\} \} }|id|d| |fƒ|djo%t| ||d|dd |ƒq5q5WndS( Nis*repr()-error*s...is...truncated...s %s%-15s = %s s[%i]s R(s...s...truncated...(R#tunfoldR%tobjtlengthtAttributeErrort ValueErrorttrangetminR0titvalueR+R.R'RRtirangetrvalueRRRRR1R(R3RRRRRtjoinR4R<R2R9R#R:R.((R tprint_sequence¾s<  &  c CsHy,t|ƒ|jp ||jodSnWn dSnXt|dƒo&t|i|||d|d|ƒnÕt|dƒo&t||||dd|d|ƒnŸt |ƒo1t|ƒ|j ot ||||d|ƒnat|dƒoPh}x$|iD]}t||ƒ||tdR@tattrtgetattr( R3RRRRRRRCRD((R R1ás*  ! cCsyt|ƒ}Wn d}nXt|ƒtjo|t d}n|id||fƒt|||d|dd|ƒdS(Ns*repr()-error*s...s%s%s s iR( R+R3R.R%R0RRRR1RR(R3RRRRRR.((R t print_objs cCs$t|d|d|dddƒdS(NRtoffsetitlocals(t print_stackRRRG(RRRG((R tprint_stack_with_localssc CsSy ddWn^tj oRtiƒdi}x:t|dƒD]#}|idj o |i}qAqAWnXg} x"|o| i |ƒ|i}qvW| i ƒt iƒ} |idƒx‘t| | ƒ| D]{\}\} }}} |id| ||fƒ| o|idti| ƒƒn|ot||ddd d ƒqÐqÐWdS( NiiisStack: s File "%s", line %d, in %s s %s Rs |RR (tZeroDivisionErrorRRRtftrangeRGR9tf_backRtframesR'treverset _tracebackt extract_stacktstackRRttuplesRRtfilenametlinenotnametlinet_stringtstripRHR( RRRGRHRWRLR9RRVRORXRURS((R RIs.     c Csñ|iiƒ}|iƒ|idƒxÄ|D]¼\}}|i |dƒ}x(t t |ƒdƒD]}d||R1RFRJRIRbRhRit __debug__R~(.R­RiR¿R>RIRRªR°RƒRµR¯RFR±R¥R®R1R²RRQR³RR RR_RR/R´R¶R¬R]RYRfR¨R~RRhRˆRbRR0R·RJR R&R©R ((R t?sX$ $ -  /$#!   ÿz