Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
 lŽŒYÒîã"@s´dZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z Gdd„deƒZddddd d d d d g Zdd„Zdd„Zdd„ZGdd„deƒZdZGdd„dejejƒZedk rûd ddddddddd d!d"d#d$d%d&d'd(dd)d*d+d,d-d.d/d0d1d2d3d4d5d6d7g"Zx2eD]*Zeeed8eƒjjƒd97Zq·Weejj7Z[[ddd:d„Zddd;d„Z d<d „Z!d=d „Z"d>d „Z#dd?d „Z$d@d„Z%dAZ&dBdC„Z'dDd „Z(dEZ)dFdG„Z*e+dHkr°ddl,Z,e,j*ƒdS)Ia_ The Python Debugger Pdb ======================= To use the debugger in its simplest form: >>> import pdb >>> pdb.run('') The debugger's prompt is '(Pdb) '. This will stop in the first function call in . Alternatively, if a statement terminated with an unhandled exception, you can use pdb's post-mortem facility to inspect the contents of the traceback: >>> >>> import pdb >>> pdb.pm() The commands recognized by the debugger are listed in the next section. Most can be abbreviated as indicated; e.g., h(elp) means that 'help' can be typed as 'h' or 'help' (but not as 'he' or 'hel', nor as 'H' or 'Help' or 'HELP'). Optional arguments are enclosed in square brackets. Alternatives in the command syntax are separated by a vertical bar (|). A blank line repeats the previous command literally, except for 'list', where it lists the next 11 lines. Commands that the debugger doesn't recognize are assumed to be Python statements and are executed in the context of the program being debugged. Python statements can also be prefixed with an exclamation point ('!'). This is a powerful way to inspect the program being debugged; it is even possible to change variables or call functions. When an exception occurs in such a statement, the exception name is printed but the debugger's state is not changed. The debugger supports aliases, which can save typing. And aliases can have parameters (see the alias help entry) which allows one a certain level of adaptability to the context under examination. Multiple commands may be entered on a single line, separated by the pair ';;'. No intelligence is applied to separating the commands; the input is split at the first ';;', even if it is in the middle of a quoted string. If a file ".pdbrc" exists in your home directory or in the current directory, it is read in and executed as if it had been typed at the debugger prompt. This is particularly useful for aliases. If both files exist, the one in the home directory is read first and aliases defined there can be overridden by the local file. Aside from aliases, the debugger is not directly programmable; but it is implemented as a class from which you can derive your own debugger class, which you can make as fancy as you like. Debugger commands ================= éNc@seZdZdZdS)ÚRestartzBCauses a debugger to be restarted for the debugged python program.N)Ú__name__Ú __module__Ú __qualname__Ú__doc__©rrú"/opt/python35/lib/python3.5/pdb.pyrTs rÚrunÚpmÚPdbÚrunevalÚrunctxÚruncallÚ set_traceÚ post_mortemÚhelpcCs–tjdtj|ƒƒ}yt|ƒ}Wntk rDdSYnX|�Dx<t|ddƒD](\}}|j|ƒr_|||fSq_WWdQRXdS)Nzdef\s+%s\s*[(]Ústarté)ÚreÚcompileÚescapeÚopenÚOSErrorÚ enumerateÚmatch)ÚfuncnameÚfilenameZcreÚfpÚlinenoÚlinerrrÚ find_function[s  r cCsztj|ƒ\}}tj|ƒr@|j|jkr@|dfStj|ƒrY|dfStj||d…ƒ|dfS)Nr)ÚinspectZ findsourceZisframeÚ f_globalsÚf_localsZismoduleZgetblock)ÚobjÚlinesrrrrÚgetsourcelineshs !  r&cCsJttj|ƒƒ}|jƒx$|D]\}}||kr&|Sq&WdS)Nr)ÚlistÚdisZfindlinestartsÚreverse)ÚcodeZlastiZ linestartsÚirrrrÚ lasti2linenoqs   r,c@s"eZdZdZdd„ZdS)Ú_rstrz#String that doesn't quote its repr.cCs|S)Nr)ÚselfrrrÚ__repr__|sz_rstr.__repr__N)rrrrr/rrrrr-zs r-z -> c@s¦eZdZdZddddddd„Zdd„Zdd „Zd d „Zd d „Zdd„Z dd„Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Zd d!„Zd"d#„Zd$d%„Zd&d'„Zd(d)„Zd*d+„Zd,d-„Zd.d/„Zd0d1„Zd2d3„Zd4d5„ZeZd6d7d8„Zd9d:„ZeZ eZ!eZ"d;d<„Z#eZ$d=d>„Z%d?d@„Z&dAdB„Z'eZ(dCdD„Z)eZ*dEdF„Z+eZ,dGdH„Z-eZ.dIdJ„Z/e/Z0eZ1eZ2dKdL„Z3e3Z4e3Z5dMdN„Z6dOdP„Z7e7Z8dQdR„Z9e9Z:dSdT„Z;e;Z<dUdV„Z=e=Z>dWdX„Z?e?Z@dYdZ„ZAeAZBd[d\„ZCeCZDd]d^„ZEeEZFZGd_d`„ZHeHZIdadb„ZJeZKdcdd„ZLeLZMeLZNdedf„ZOdgdh„ZPePZQdidj„ZReRZSdkdl„ZTddmdn„ZUdodp„ZVdqdr„ZWeZXeZYeZZdsdt„Z[e[Z\dudv„Z]e]Z^dwdx„Z_eZ`fddydz„Zad{d|„ZbeZcd}d~„ZdeZedd€„Zfd�d‚„Zgdƒd„„Zhd…d†„Zid‡dˆ„Zjd‰dŠ„Zkd‹dŒd�dŽd�d�gZld‘d’„Zmend“d”„Zod•d–„ZpepZqd—d˜„Zrd™dš„Zsd›dœ„Ztd�dž„ZudS)Ÿr NZtabFc $Cs›tjj|d|ƒtjj||||ƒ|r>d|_d|_i|_i|_d|_ d|_ i|_ yddl }|j dƒWntk r¥YnXd|_||_g|_dtjkr+tjd}y9ttjj|dƒƒ�}|jj|ƒWdQRXWntk r*YnXy*tdƒ�}|jj|ƒWdQRXWntk riYnXi|_i|_i|_d|_d|_dS) NÚskiprz(Pdb) ÚFz `@#$%^&*()=+[{]}\|;:'",<>?ÚHOMEz.pdbrc)ÚbdbÚBdbÚ__init__ÚcmdÚCmdZ use_rawinputÚpromptÚaliasesÚ displayingÚ mainpyfileÚ_wait_for_mainpyfileÚ tb_linenoÚreadlineZset_completer_delimsÚ ImportErrorÚ allow_kbdintÚnosigintÚrcLinesÚosÚenvironrÚpathÚjoinÚextendrÚcommandsÚcommands_dopromptÚcommands_silentÚcommands_definingÚ commands_bnum) r.Ú completekeyÚstdinÚstdoutr0rAr>ZenvHomeZrcFilerrrr5‹sF                   z Pdb.__init__cCs7|jrt‚|jdƒ|jƒ|j|ƒdS)Nz- Program interrupted. (Use 'cont' to resume).)r@ÚKeyboardInterruptÚmessageÚset_stepr)r.ÚsignumÚframerrrÚsigint_handlerºs    zPdb.sigint_handlercCstjj|ƒ|jƒdS)N)r3r4ÚresetÚforget)r.rrrrVÁsz Pdb.resetcCs5d|_g|_d|_d|_|jjƒdS)Nr)rÚstackÚcurindexÚcurframer=Úclear)r.rrrrWÅs     z Pdb.forgetcCs–|jƒ|j||ƒ\|_|_x;|ret|jj|jƒ}||j|j<|j }q+W|j|jd|_ |j j |_ |j ƒS)Nr)rWZ get_stackrXrYr,Útb_frameÚf_codeÚtb_lastir=Útb_nextrZr#Úcurframe_localsÚ execRcLines)r.ÚfÚtbrrrrÚsetupÌs   z Pdb.setupcCsŠ|js dS|j}|jƒg|_xZ|r…|jƒjƒ}|r,|ddkr,|j|ƒr,|jt|ƒ7_dSq,WdS)Nrú#T)rBr)ÚpopÚstripÚonecmdÚreversed)r.rBrrrrraÞs     zPdb.execRcLinescCs=|jr dS|j|ƒr9|jdƒ|j|dƒdS)znThis method is called when there is the remote possibility that we ever need to stop in this function.Nz--Call--)r<Z stop_hererQÚ interaction)r.rTZ argument_listrrrÚ user_callòs   z Pdb.user_callcCsf|jrC|j|j|jjƒks6|jdkr:dSd|_|j|ƒrb|j|dƒdS)z;This function is called when we stop or break at this line.rNF)r<r;Úcanonicr]Ú co_filenameÚf_linenoÚ bp_commandsrj)r.rTrrrÚ user_lineûs  z Pdb.user_linecCsÊt|ddƒrÆ|j|jkrÆ|j}d|_|j}|j|dƒx"|j|D]}|j|ƒq]W||_|j|s¡|j|j|j ƒ|j |r¸|j ƒ|j ƒdSdS)z¾Call every command that was set for the current active breakpoint (if there is one). Returns True if the normal interaction function must be called, False otherwise.Ú currentbpFrNr) ÚgetattrrqrHÚlastcmdrdrhrJÚprint_stack_entryrXrYrIÚ_cmdlooprW)r.rTrqZ lastcmd_backrrrrros         zPdb.bp_commandscCs;|jr dS||jd<|jdƒ|j|dƒdS)z7This function is called when a return trap is set here.NÚ __return__z --Return--)r<r#rQrj)r.rTZ return_valuerrrÚ user_returns    zPdb.user_returncCs�|jr dS|\}}}||f|jd<| rH|tkrHdnd}|jd|tj||ƒdjƒfƒ|j||ƒdS)zoThis function is called if an exception occurs, but only if we are to stop at or just below this level.NZ __exception__z Internal r1z%s%sréÿÿÿÿ)r<r#Ú StopIterationrQÚ tracebackÚformat_exception_onlyrgrj)r.rTÚexc_infoÚexc_typeÚ exc_valueÚ exc_tracebackÚprefixrrrÚuser_exception%s  !zPdb.user_exceptionc CsNxGy!d|_|jƒd|_PWqtk rE|jdƒYqXqWdS)NTFz--KeyboardInterrupt--)r@ÚcmdlooprPrQ)r.rrrru9s    z Pdb._cmdloopcCs‡|jj|jƒ}|rƒxe|jƒD]W\}}|j|ƒ}||k r(||kr(|||<|jd|||fƒq(WdS)Nzdisplay %s: %r [old: %r])r:ÚgetrZÚitemsÚ_getval_exceptrQ)r.r:ÚexprZoldvalueZnewvaluerrrÚpreloopFs  z Pdb.preloopcCswtjr(tjtjtjƒdt_|j||ƒrH|jƒdS|j|j|jƒ|j ƒ|jƒdS)N) r Ú_previous_sigint_handlerÚsignalÚSIGINTrdrWrtrXrYru)r.rTrzrrrrjSs    zPdb.interactioncCs#|dk r|jt|ƒƒdS)z{Custom displayhook for the exec in default(), which prevents assignment of the _ variable in the builtins. N)rQÚrepr)r.r$rrrÚ displayhookas zPdb.displayhookc Cs |dd…dkr&|dd…}|j}|jj}yŒt|dddƒ}tj}tj}tj}z8|jt_|jt_|jt_t|||ƒWd|t_|t_|t_XWn>tj ƒdd…}|j t j |Œdj ƒƒYnXdS)Nrú!Ú zZsingleérx)r`rZr"rÚsysrOrNrŒÚexecr|Úerrorrzr{rg) r.rÚlocalsÚglobalsr*Z save_stdoutZ save_stdinZsave_displayhookr|rrrÚdefaultis(          z Pdb.defaultcCs.|jƒs|S|jƒ}x |d|jkr¾|j|d}d}x>|dd…D],}|jdt|ƒ|ƒ}|d7}qZW|jddj|dd…ƒƒ}|jƒ}qW|ddkr*|jdƒ}|dkr*||d d…jƒ}|jj |ƒ|d|…j ƒ}|S) z*Handle alias expansion and ';;' separator.rrNú%z%*ú Úaliasz;;r�) rgÚsplitr9ÚreplaceÚstrrFÚfindÚlstripÚcmdqueueÚappendÚrstrip)r.rÚargsÚiiZtmpArgÚmarkerÚnextrrrÚprecmds&   % z Pdb.precmdcCs-|jstjj||ƒS|j|ƒSdS)zÒInterpret the argument as though it had been typed in response to the prompt. Checks whether this line is typed at the normal prompt or in a breakpoint command list definition. N)rKr6r7rhÚhandle_command_def)r.rrrrrh˜s z Pdb.onecmdc Csþ|j|ƒ\}}}|s"dS|dkrBd|j|jâs z*Pdb._complete_bpnumber..)rr3Ú BreakpointÚ bpbynumber)r.r½rr¾r¿r)r½rÚ_complete_bpnumberÞszPdb._complete_bpnumberc s|js gS|jjjƒ}|j|jƒdˆkrâˆjdƒ‰y<|ˆd}x'ˆdd…D]}t||ƒ}qlWWnttfk r¤gSYnXdj ˆdd…ƒd‰‡‡fdd†t |ƒDƒS‡fdd†|j ƒDƒSdS) NÚ.rrcs-g|]#}|jˆdƒrˆ|‘qS)rrx)rÄ)rÅÚn)Údottedr€rrrÇús z,Pdb._complete_expression..cs%g|]}|jˆƒr|‘qSr)rÄ)rÅrÌ)r½rrrÇýs rxrx) rZr"ÚcopyÚupdater`r™rrÚKeyErrorr©rFÚdirÚkeys)r.r½rr¾r¿Únsr$Úpartr)rÍr€r½rr·ås    zPdb._complete_expressioncCsz|sttjjƒd}n,yt|ƒ}Wn|jdƒdSYnX||_||jkrŠ|j||j||j |f}nd}g|j|)rZr]rmr;)r.rrrrrã¯s zPdb.defaultFilecCs|j|dƒdS)z¶tbreak [ ([filename:]lineno | function) [, condition] ] Same arguments as break, but sets a temporary breakpoint: it is automatically deleted when first hit. rN)rë)r.r«rrrÚ do_tbreak»sz Pdb.do_tbreakc Csd}|jdƒ}t|ƒdkr:|djƒ}n)t|ƒdkr_|djƒ}n|S|dkrs|S|jdƒ}|ddkr¯|d=t|ƒdkr¯|S|jƒ}t|ƒdkrÚ|d}n)|j|dƒ}|rù|}|d}t||ƒ} | p|S) Nú'rrér1rËr.)NNN)r™rÕrgrãrÛr ) r.Z identifierZfailedZidstringÚidÚpartsZfnameÚitemrbZanswerrrrrâÄs.    z Pdb.lineinfocCs±t|dƒr|jjnd}tj|||ƒ}|sM|jdƒdS|jƒ}| sœ|ddksœ|dd…dksœ|dd…dkr­|jd ƒdS|S) zÈCheck whether specified line seems to be executable. Return `lineno` if it is, 0 if not (e.g. a docstring, comment, blank line or EOF). Warning: testing is not comprehensive. rZNz End of filerrerîz"""z'''zBlank or comment)rÞrZr"Ú linecacheÚgetlinerQrgr’)r.rrrÁrrrrräås!  , z Pdb.checklinecCs„|jƒ}xq|D]i}y|j|ƒ}Wn2tk r`}z|j|ƒWYdd}~XqX|jƒ|jd|ƒqWdS)z†enable bpnumber [bpnumber ...] Enables the breakpoints given as a space separated list of breakpoint numbers. Nz Enabled %s)r™Úget_bpbynumberrÜr’ÚenablerQ)r.r«r¡r+rÆrêrrrÚ do_enableús    z Pdb.do_enablecCs„|jƒ}xq|D]i}y|j|ƒ}Wn2tk r`}z|j|ƒWYdd}~XqX|jƒ|jd|ƒqWdS)aNdisable bpnumber [bpnumber ...] Disables the breakpoints given as a space separated list of breakpoint numbers. Disabling a breakpoint means it cannot cause the program to stop execution, but unlike clearing a breakpoint, it remains in the list of breakpoints and can be (re-)enabled. Nz Disabled %s)r™rôrÜr’ÚdisablerQ)r.r«r¡r+rÆrêrrrÚ do_disable s    zPdb.do_disablecCsé|jddƒ}y|d}Wntk r:d}YnXy|j|djƒƒ}WnPtk ry|jdƒYnltk rª}z|j|ƒWYdd}~Xn;X||_|sÑ|jd|jƒn|jd|jƒdS)a#condition bpnumber [condition] Set a new condition for the breakpoint, an expression which must evaluate to true before the breakpoint is honored. If condition is absent, any existing condition is removed; i.e., the breakpoint is made unconditional. r—rNrzBreakpoint number expectedz#Breakpoint %d is now unconditional.z$New condition set for breakpoint %d.) r™Ú IndexErrorrôrgr’rÜrçrQræ)r.r«r¡rçrÆrêrrrÚ do_conditions     zPdb.do_conditioncCs|jƒ}yt|djƒƒ}Wnd}YnXy|j|djƒƒ}WnPtk ru|jdƒYn—tk r¦}z|j|ƒWYdd}~XnfX||_|dkrø|dkrÕd|}nd}|jd||j fƒn|jd|j ƒdS) a–ignore bpnumber [count] Set the ignore count for the given breakpoint number. If count is omitted, the ignore count is set to 0. A breakpoint becomes active when the ignore count is zero. When non-zero, the count is decremented each time the breakpoint is reached and the breakpoint is not disabled and any associated condition evaluates to true. rrzBreakpoint number expectedNz %d crossingsz 1 crossingz%Will ignore next %s of breakpoint %d.z-Will stop next time breakpoint %d is reached.) r™rÖrgrôrùr’rÜÚignorerQræ)r.r«r¡ÚcountrÆrêZcountstrrrrÚ do_ignore:s(          z Pdb.do_ignorec !Csí|s˜ytdƒ}Wntk r0d}YnX|jƒjƒ}|d kr”dd„tjjDƒ}|jƒx|D]}|jd|ƒqyWdSd |krf|j d ƒ}|d|…}||d d…}yt |ƒ}Wnt k rd |}Yn%X|j ||ƒ}|j ||ƒ}|r@|j|ƒn"x|D]}|jd|ƒqGWdS|jƒ} xt| D]l}y|j|ƒ}Wn2t k rÆ}z|j|ƒWYdd}~XqyX|j|ƒ|jd|ƒqyWdS) a=cl(ear) filename:lineno cl(ear) [bpnumber [bpnumber...]] With a space separated list of breakpoint numbers, clear those breakpoints. Without argument, clear all breaks (but first ask confirmation). With a filename:lineno argument, clear all breaks at that line in that file. zClear all breaks? ÚnoÚyÚyescSsg|]}|r|‘qSrr)rÅrÆrrrrÇks z Pdb.do_clear..z Deleted %sNr°rzInvalid line number (%s))rÿr)ÚinputÚEOFErrorrgr¼r3rÈrÉZclear_all_breaksrQrÚrÖrÜråZ clear_breakr’r™rôZclear_bpbynumber) r.r«ZreplyZbplistrÆr+rrrêZ numberlistrrrÚdo_clear]sF            z Pdb.do_clearcCs|jƒdS)zâw(here) Print a stack trace, with the most recent frame at the bottom. An arrow indicates the "current frame", which determines the context of most commands. 'bt' is an alias for this command. N)Úprint_stack_trace)r.r«rrrÚdo_where�sz Pdb.do_wherecCs~d|ko t|jƒkns+t‚||_|j|jd|_|jj|_|j|j|jƒd|_dS)Nr) rÕrXÚAssertionErrorrYrZr#r`rtr)r.rærrrÚ _select_framešs + zPdb._select_framec Csœ|jdkr |jdƒdSyt|p/dƒ}Wn'tk r_|jd|ƒdSYnX|dkrud}ntd|j|ƒ}|j|ƒdS)z‚u(p) [count] Move the current frame count (default one) levels up in the stack trace (to an older frame). rz Oldest frameNrzInvalid frame count (%s))rYr’rÖrÜÚmaxr)r.r«rüÚnewframerrrÚdo_up¢s     z Pdb.do_upc CsÃ|jdt|jƒkr-|jdƒdSyt|p<dƒ}Wn'tk rl|jd|ƒdSYnX|dkr�t|jƒd}n#tt|jƒd|j|ƒ}|j|ƒdS)z…d(own) [count] Move the current frame count (default one) levels down in the stack trace (to a newer frame). rz Newest frameNzInvalid frame count (%s)r)rYrÕrXr’rÖrÜÚminr)r.r«rür rrrÚdo_down¶s    #z Pdb.do_downc Csƒ|rfyt|ƒ}Wn'tk r?|jd|ƒdSYnX||jjkrl|jdƒdSnd}|j|j|ƒdS)aNunt(il) [lineno] Without argument, continue execution until the line with a number greater than the current one is reached. With a line number, continue execution until a line with a number greater or equal to that is reached. In both cases, also stop when the current frame returns. zError in argument: %rNz7"until" line number is smaller than current line numberr)rÖrÜr’rZrnZ set_until)r.r«rrrrÚdo_untilÊs   z Pdb.do_untilcCs|jƒdS)z§s(tep) Execute the current line, stop at the first possible occasion (either in a function that is called or in the current function). r)rR)r.r«rrrÚdo_stepâs z Pdb.do_stepcCs|j|jƒdS)zxn(ext) Continue execution until the next line in the current function is reached or it returns. r)Zset_nextrZ)r.r«rrrÚdo_nextìsz Pdb.do_nextcCsT|rJddl}tjdd…}|j|ƒt_|tjdd…". If an exception is being debugged, the line where the exception was originally raised or propagated is indicated by ">>", if it differs from the current line. r'NrËr±rézError in argument: %ré z[EOF])rsr™rÖrgrrÜr’rrZrnr]rmÚget_file_breaksròÚgetlinesr"Ú _print_linesr rÕrQrP)r.r«ZlastÚfirstrÚ breaklistr%rrrÚdo_list¨s>           z Pdb.do_listcCs�|jjj}|j|ƒ}yt|jƒ\}}Wn6tk ro}z|j|ƒdSWYdd}~XnX|j||||jƒdS)z\longlist | ll List the whole source code for the current function or frame. N)rZr]rmr0r&rr’r2)r.r«rr4r%rrêrrrÚ do_longlistÛs zPdb.do_longlistcCs‹y|j|ƒ}Wn dSYnXyt|ƒ\}}Wn<ttfk rv}z|j|ƒdSWYdd}~XnX|j||ƒdS)z^source expression Try to get source code for the given object and display it. N)r*r&rÚ TypeErrorr’r2)r.r«r$r%rrêrrrÚ do_sourceés  z Pdb.do_sourcec Csó|r'|j}|jj|d ƒ}n d }}x»t||ƒD]ª\}}t|ƒjdƒ} t| ƒdkr~| d7} ||kr—| d7} n | d7} ||krº| d7} n||krÐ| d7} |j| d|jƒƒqAWd S) zPrint a range of lines.rrîrr—ÚBz->z>>ú Nrxrx) rnr=rƒrr›ÚrjustrÕrQr ) r.r%rrÙrTZcurrent_linenoZ exc_linenorrÚsrrrr2ús           zPdb._print_linescCsòy|j|ƒ}Wn dSYnXd}y |j}Wntk rIYnX|rh|jd|jƒdSy|jj}Wntk rŒYnX|r«|jd|jƒdS|jtkrÛ|jd|j|j fƒdS|jt|ƒƒdS)z;whatis arg Print the type of the argument. Nz Function %sz Method %sz Class %s.%s) r*rßr¸rQràrØÚ __class__Útyperr)r.r«Úvaluer*rrrÚ do_whatiss.    z Pdb.do_whatiscCs–|sP|jdƒx||jj|jiƒjƒD]}|jd|ƒq2WnB|j|ƒ}||jj|jiƒ|<|jd||fƒdS)zâdisplay [expression] Display the value of the expression if it changed, each time execution stops in the current frame. Without expression, list all display expressions for the current frame. zCurrently displaying:z%s: %rzdisplay %s: %rN)rQr:rƒrZr„r…Ú setdefault)r.r«rñÚvalrrrÚ do_display2s %zPdb.do_displayc Csf|rLy|jj|jiƒ|=Wqbtk rH|jd|ƒYqbXn|jj|jdƒdS)z·undisplay [expression] Do not display the expression any more in the current frame. Without expression, clear all display expressions for the current frame. znot displaying %sN)r:rƒrZrÐr’rf)r.r«rrrÚ do_undisplayEs  zPdb.do_undisplaycs)‡fdd†|jj|jiƒDƒS)Ncs%g|]}|jˆƒr|‘qSr)rÄ)rÅr)r½rrrÇUs z*Pdb.complete_undisplay..)r:rƒrZ)r.r½rr¾r¿r)r½rÚcomplete_undisplayTszPdb.complete_undisplaycCs9|jjjƒ}|j|jƒtjdd|ƒdS)z interact Start an interactive interpreter whose global namespace contains all the (global and local) names found in the current scope. z *interactive*ÚlocalN)rZr"rÎrÏr`r*Úinteract)r.r«rÓrrrÚ do_interactXszPdb.do_interactcCsÜ|jƒ}t|ƒdkrft|jjƒƒ}x,|D]$}|jd||j|fƒq:WdS|d|jkr´t|ƒdkr´|jd|d|j|dfƒn$dj|dd…ƒ|j|d