eaiovnaovbqoebvqoeavibavo B YI~d"@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z Gddde Zdddddd d d d g Zd dZddZddZGdddeZdZGdddejejZedk r^d dddddddddd d!d"d#d$d%d&d'dd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6g"Zx*eD]"Zeeed7ejd87Zq(Weejj7Z[[dId9dZdJd:dZ d;dZ!dd Z#dKd?d Z$d@dZ%dAZ&dBdCZ'dDd Z(dEZ)dFdGZ*e+dHkrddl,Z,e,*dS)LNc@s eZdZdS)RestartN)__name__ __module__ __qualname__rr(/opt/alt/python37/lib64/python3.7/pdb.pyrUsrrunpmPdbrunevalrunctxruncall set_trace post_mortemhelpc Csxtdt|}y t|}Wntk r4dSX|4x,t|ddD]\}}||rJ|||fSqJWWdQRXdS)Nzdef\s+%s\s*[(])start)recompileescapeopenOSError enumeratematch)funcnamefilenameZcrefplinenolinerrr find_function\s  rcCsXt|\}}t|r,|j|jkr,|dfSt|r>|dfSt||d|dfS)Nr)inspectZ findsourceZisframe f_globalsf_localsZismoduleZgetblock)objlinesrrrrgetsourcelinesis  r%cCs8tt|}|x|D]\}}||kr|SqWdS)Nr)listdisZfindlinestartsreverse)codeZlastiZ linestartsirrrr lasti2linenors r+c@seZdZddZdS)_rstrcCs|S)Nr)selfrrr__repr__}sz_rstr.__repr__N)rrrr.rrrrr,{sr,z -> c@seZdZdZdddZddZd d Zd d Zd dZddZ ddZ ddZ ddZ ddZ ddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6ZeZdd8d9Zd:d;ZeZ eZ!eZ"dd?Z%d@dAZ&dBdCZ'eZ(dDdEZ)eZ*dFdGZ+eZ,dHdIZ-eZ.dJdKZ/e/Z0eZ1eZ2dLdMZ3e3Z4e3Z5dNdOZ6dPdQZ7e7Z8dRdSZ9e9Z:dTdUZ;e;ZdXdYZ?e?Z@dZd[ZAeAZBd\d]ZCeCZDd^d_ZEeEZFZGd`daZHeHZIdbdcZJeZKdddeZLeLZMeLZNdfdgZOdhdiZPePZQdjdkZReRZSdldmZTddndoZUdpdqZVdrdsZWeZXeZYeZZdtduZ[e[Z\dvdwZ]e]Z^dxdyZ_eZ`dd{d|Zad}d~ZbeZcddZdeZeddZfddZgddZhddZiddZjddZkddddddgZlddZmenfddZoddZpepZqddZrddZsddZtddZuddZvdS)r NtabFTc Cs4tjj||dtj|||||r,d|_d|_i|_i|_d|_ d|_ i|_ yddl }| dWntk rzYnXd|_||_g|_|ry,ttjd}|j|WdQRXWntk rYnXy$td}|j|WdQRXWntk rYnXi|_i|_i|_d|_d|_dS) N)skiprz(Pdb) Fz `@#$%^&*()=+[{]}\|;:'",<>?z~/.pdbrcz.pdbrc)bdbBdb__init__cmdCmdZ use_rawinputpromptaliases displaying mainpyfile_wait_for_mainpyfile tb_linenoreadlineZset_completer_delims ImportError allow_kbdintnosigintrcLinesrospath expanduserextendrcommandscommands_dopromptcommands_silentcommands_defining commands_bnum) r- completekeystdinstdoutr0r@Zreadrcr=ZrcFilerrrr4sD z Pdb.__init__cCs*|jr t|d|||dS)Nz- Program interrupted. (Use 'cont' to resume).)r?KeyboardInterruptmessageset_stepr)r-Zsignumframerrrsigint_handlers  zPdb.sigint_handlercCstj||dS)N)r2r3resetforget)r-rrrrSs z Pdb.resetcCs&d|_g|_d|_d|_|jdS)Nr)rstackcurindexcurframer<clear)r-rrrrTs z Pdb.forgetcCsl||||\|_|_x*|rFt|jj|j}||j|j<|j }qW|j|jd|_ |j j |_ | S)Nr)rTZ get_stackrUrVr+tb_framef_codetb_lastir<tb_nextrWr"curframe_locals execRcLines)r-ftbrrrrsetups   z Pdb.setupcCsh|js dS|j}|g|_xD|rb|}|r |ddkr ||r |jt|7_dSq WdS)Nr#T)rAr(popstriponecmdreversed)r-rArrrrr^s  zPdb.execRcLinescCs.|jr dS||r*|d||ddS)Nz--Call--)r;Z stop_hererO interaction)r-rQZ argument_listrrr user_calls   z Pdb.user_callcCsH|jr.|j||jjks$|jdkr(dSd|_||rD||ddS)NrF)r;r:canonicrZ co_filenamef_lineno bp_commandsrg)r-rQrrr user_lines  z Pdb.user_linecCst|ddr|j|jkr|j}d|_|j}||dx|j|D]}||qBW||_|j|sv||j|j |j |r| | dSdS)N currentbpFrr) getattrrnrFlastcmdrarerHprint_stack_entryrUrVrG_cmdlooprT)r-rQrnZ lastcmd_backrrrrrls      zPdb.bp_commandscCs.|jr dS||jd<|d||ddS)N __return__z --Return--)r;r"rOrg)r-rQZ return_valuerrr user_returns   zPdb.user_returncCsh|jr dS|\}}}||f|jd<|s2|tkr2dnd}|d|t||df|||dS)NZ __exception__z Internal r1z%s%s)r;r" StopIterationrO tracebackformat_exception_onlyrdrg)r-rQexc_infoexc_type exc_value exc_tracebackprefixrrruser_exception%s zPdb.user_exceptioncCsDx>yd|_|d|_PWqtk r:|dYqXqWdS)NTFz--KeyboardInterrupt--)r?cmdlooprNrO)r-rrrrr9sz Pdb._cmdloopcCsb|j|j}|r^xJ|D]>\}}||}||k r||kr|||<|d|||fqWdS)Nzdisplay %s: %r [old: %r])r9getrWitems_getval_exceptrO)r-r9exprZoldvalueZnewvaluerrrpreloopFs z Pdb.preloopcCsZtjrttjtjdt_|||r4|dS||j|j| |dS)N) r _previous_sigint_handlersignalSIGINTrarTrqrUrVrr)r-rQrwrrrrgSs zPdb.interactioncCs|dk r|t|dS)N)rOrepr)r-r#rrr displayhookaszPdb.displayhookc Cs|dddkr|dd}|j}|jj}ydt|ddd}tj}tj}tj}z(|jt_|jt_|jt_t|||Wd|t_|t_|t_XWn4t dd}| t j |d YnXdS)Nr! zZsingleru)r]rWr!rsysrMrLrexecryerrorrwrxrd) r-rlocalsglobalsr)Z save_stdoutZ save_stdinZsave_displayhookryrrrdefaultis(  z Pdb.defaultcCs|s |S|}xx|d|jkr|j|d}d}x0|ddD] }|dt||}|d7}qDW|dd|dd}|}qW|ddkr|d}|dkr||dd}|j ||d| }|S) Nrr%z%* aliasz;;r) rdsplitr8replacestrjoinfindlstripcmdqueueappendrstrip)r-rargsiiZtmpArgZmarkernextrrrprecmds&     z Pdb.precmdcCs"|jstj||S||SdS)N)rIr5r6rehandle_command_def)r-rrrrresz Pdb.onecmdcCs||\}}}|sdS|dkr0d|j|j<dS|dkrBg|_dS|j|j}|rf||d|n ||yt|d|}Wntk r|j}YnX|j |j krd|j |j<g|_dSdS)NZsilentTendrrdo_F) Z parselinerHrJrrFrroAttributeErrorrrcommands_resumingrG)r-rr5argZcmdlistfuncrrrrs,      zPdb.handle_command_defcCst||jddS)N)file)printrM)r-msgrrrrOsz Pdb.messagecCstd||jddS)Nz***)r)rrM)r-rrrrrsz Pdb.errorcCs|drgSy|||||}Wntk r>g}YnXt|d}xP|D]H}tj|rt||dqTtj |rT| drT||dqTW|S)N):,*/)z.pyz.pywr) rdendswith_complete_expression ExceptionglobrBrCisdirrisfilelower)r-textrbegidxendidxretglobsfnrrr_complete_locations   zPdb._complete_locationcsfddttjjDS)Ncs.g|]&\}}|dk rt|rt|qS)N)r startswith).0r*bp)rrr sz*Pdb._complete_bpnumber..)rr2 Breakpoint bpbynumber)r-rrrrr)rr_complete_bpnumberszPdb._complete_bpnumberc s|js gS|jj}||jdkrdy0|d}xddD]}t||}qPWWnttfk r|gSXd dddfddt |DSfdd| DSdS)N.rrrucs"g|]}|dr|qS)ru)r)rn)dottedr}rrrsz,Pdb._complete_expression..csg|]}|r|qSr)r)rr)rrrrs) rWr!copyupdater]rroKeyErrorrrdirkeys)r-rrrrnsr#partr)rr}rrrs    zPdb._complete_expressioncCs(|sttjjd}n"y t|}Wn|ddS||_||jkrf|j||j||j |f}nd}g|j|<d|j|<d|j |<|j }d|_ d|_ zzy | Wnht k r|r|d|j|<|d|j|<|d|j |<n|j|=|j|=|j |=|dYnXWdd|_ ||_ XdS) Nrz.Usage: commands [bnum] ... endTFz(com) rrz1command definition aborted, old commands restored)lenr2rrintrrJrFrGrHr7rIrrN)r-rZbnumZold_command_defsZ prompt_backrrr do_commandss@%       zPdb.do_commandsrc Cs@|s<|jr8|dx"tjjD]}|r||qWdSd}d}d}|d}|dkr~||dd}|d|}| d}d} |dkr|d|}| |} | s| d|dS| }||dd}y t |}Wn$t k r| d|dSXny t |}Wnt k ryt||jj|j} Wn|} YnXy.t| drl| j} | j} | j} | j}| j}Wn@||\} }}| s| d |dS| } t |}YnXYnX|s|}|||}|r<|||||| }|r| |n*|||d }|d |j|j|jfdS) Nz!Num Type Disp Enb Whererrrrz%r not found from sys.pathzBad lineno: %s__func__zJThe specified object %r is not a function or was not found along sys.path.ruzBreakpoint %d at %s:%d) breaksrOr2rrZbpformatrrrrfind lookupmodulerr ValueErrorevalrWr!r]hasattrr__code__co_nameco_firstlinenorjlineinfo defaultFile checklineZ set_break get_breaksnumberrr)r-rZ temporaryrrrcondZcommaZcolonrr_rr)okZlnrerrrrrdo_breakRs~             z Pdb.do_breakcCs"|jjj}|dkr|jr|j}|S)Nz)rWrZrjr:)r-rrrrrs zPdb.defaultFilecCs||ddS)Nr)r)r-rrrr do_tbreaksz Pdb.do_tbreakc Csd}|d}t|dkr(|d}nt|dkrB|d}n|S|dkrR|S|d}|ddkr~|d=t|dkr~|S|}t|dkr|d}n||d}|r|}|d}t||} | p|S) N)NNN'rrr1rr-)rrrdrrr) r-Z identifierZfailedZidstringidpartsZfnameitemr_Zanswerrrrrs.         z Pdb.lineinfocCst|dr|jjnd}t|||}|s6|ddS|}|rn|ddksn|dddksn|dddkr||ddS|S) NrWz End of filerrbrz"""z'''zBlank or comment)rrWr! linecachegetlinerOrdr)r-rrrrrrrrs   z Pdb.checklinec Csl|}x^|D]V}y||}Wn,tk rL}z||Wdd}~XYqX||d|qWdS)Nz Enabled %s)rget_bpbynumberrrenablerO)r-rrr*rrrrr do_enables z Pdb.do_enablec Csl|}x^|D]V}y||}Wn,tk rL}z||Wdd}~XYqX||d|qWdS)Nz Disabled %s)rrrrdisablerO)r-rrr*rrrrr do_disable s zPdb.do_disablec Cs|dd}y |d}Wntk r0d}YnXy||d}WnHtk rf|dYnXtk r}z||Wdd}~XYn.X||_|s|d|jn|d|jdS)NrrrzBreakpoint number expectedz#Breakpoint %d is now unconditional.z$New condition set for breakpoint %d.) r IndexErrorrrdrrrrOr)r-rrrrrrrr do_conditions   zPdb.do_conditionc Cs|}yt|d}Wnd}YnXy||d}WnHtk rb|dYnvtk r}z||Wdd}~XYnLX||_|dkr|dkrd|}nd}|d||j fn|d|j dS)NrrzBreakpoint number expectedz %d crossingsz 1 crossingz%Will ignore next %s of breakpoint %d.z-Will stop next time breakpoint %d is reached.) rrrdrrrrignorerOr)r-rrcountrrZcountstrrrr do_ignore:s(   z Pdb.do_ignorec Cs|sxy td}Wntk r(d}YnX|}|dkrtddtjjD}|x|D]}|d|q^WdSd|kr| d}|d|}||dd}y t |}Wnt k rd |}YnX| ||}| ||}|r||nx|D]}|d|qWdS|} xd| D]\}y||}Wn.t k rj}z||Wdd}~XYnX|||d|q*WdS) NzClear all breaks? no)yZyescSsg|] }|r|qSrr)rrrrrrksz Pdb.do_clear..z Deleted %srrzInvalid line number (%s))inputEOFErrorrdrr2rrZclear_all_breaksrOrrrrZ clear_breakrrrZclear_bpbynumber) r-rZreplyZbplistrr*rrrZ numberlistrrrdo_clear]sF              z Pdb.do_clearcCs |dS)N)print_stack_trace)r-rrrrdo_wheresz Pdb.do_wherecCs>||_|j|jd|_|jj|_||j|jd|_dS)Nr)rVrUrWr"r]rqr)r-rrrr _select_frames  zPdb._select_framecCsx|jdkr|ddSyt|p"d}Wn"tk rJ|d|dSX|dkrZd}ntd|j|}||dS)Nrz Oldest framerzInvalid frame count (%s))rVrrrmaxr)r-rrnewframerrrdo_ups  z Pdb.do_upcCs|jdt|jkr"|ddSyt|p,d}Wn"tk rT|d|dSX|dkrnt|jd}ntt|jd|j|}||dS)Nrz Newest framezInvalid frame count (%s)r)rVrrUrrrminr)r-rrrrrrdo_downs z Pdb.do_downcCsf|rPy t|}Wn"tk r2|d|dSX||jjkrT|ddSnd}||j|dS)NzError in argument: %rz7"until" line number is smaller than current line numberr)rrrrWrkZ set_until)r-rrrrrdo_untils   z Pdb.do_untilcCs |dS)Nr)rP)r-rrrrdo_stepsz Pdb.do_stepcCs||jdS)Nr)Zset_nextrW)r-rrrrdo_nexts z Pdb.do_nextcCs<|r4ddl}tjdd}||t_|tjdd<tdS)Nrr)shlexrargvrr)r-rrZargv0rrrdo_runs  z Pdb.do_runcCs||jdS)Nr)Z set_returnrW)r-rrrr do_returns z Pdb.do_returncCs>|js2yttj|jt_Wntk r0YnX|dS)Nr)r@rrrRr rrZ set_continue)r-rrrr do_continueszPdb.do_continuec Cs|jdt|jkr"|ddSy t|}Wntk rL|dYnnXy:||j_|j|jd|f|j|j<||j|jWn0tk r}z|d|Wdd}~XYnXdS)Nrz)You can only jump within the bottom framez)The 'jump' command requires a line numberrzJump failed: %s) rVrrUrrrrWrkrq)r-rerrrdo_jump s   z Pdb.do_jumpcCstd|jj}|j}t|j|j|j}d|j |_ | dyt |j |||fWn<tk rtdd}|tj|d YnX| dt|j|j|_dS)Nz(%s) zENTERING RECURSIVE DEBUGGERrruzLEAVING RECURSIVE DEBUGGER)rsettracerWr!r]r rKrLrMr7rdrO call_tracingrrryrrwrxZtrace_dispatchrp)r-rrrpryrrrdo_debug=s    z Pdb.do_debugcCsd|_|dS)NTr)_user_requested_quitset_quit)r-rrrrdo_quitTsz Pdb.do_quitcCs|dd|_|dS)Nr1Tr)rOrr)r-rrrrdo_EOF_s z Pdb.do_EOFcCs|jj}|j}|j|j}|jtj@r.|d}|jtj@rB|d}xJt |D]>}|j |}||krz| d|||fqL| d|fqLWdS)Nrz%s = %rz%s = *** undefined ***) rWrZr] co_argcountco_kwonlyargcountco_flagsr Z CO_VARARGSZCO_VARKEYWORDSrange co_varnamesrO)r-rcodictrr*namerrrdo_argshs    z Pdb.do_argscCs.d|jkr |t|jdn |ddS)NrszNot yet returned!)r]rOrr)r-rrrr do_retvalys z Pdb.do_retvalcCsNyt||jj|jStdd}|tj|d YnXdS)Nrru) rrWr!r]rryrrwrxrd)r-rryrrr_getvals z Pdb._getvalcCshy.|dkrt||jj|jSt||j|jSWn4tdd}tj|d }t d|SdS)Nrruz** raised %s **) rrWr!r]r"rryrwrxrdr,)r-rrQryrrrrrszPdb._getval_exceptcCs*y|t||Wn YnXdS)N)rOrr!)r-rrrrdo_pszPdb.do_pcCs,y|t||Wn YnXdS)N)rOpprintZpformatr!)r-rrrrdo_ppsz Pdb.do_ppcCsdd|_d}|r|dkry^d|krX|d\}}t|}t|}||krr||}nt|}td|d}Wqtk r|d|dSXn0|jdks|dkrtd|jj d}n |jd}|dkr|d}|jj j }| |}yZt ||jj}|||d||||jt|t||_t||krF|dWntk r^YnXdS) Nr&rrrzError in argument: %r z[EOF])rprrrdrrrrrWrkrZrjget_file_breaksrgetlinesr! _print_linesrrrOrN)r-rZlastfirstr breaklistr$rrrdo_lists>        z Pdb.do_listc Csj|jjj}||}yt|j\}}Wn,tk rR}z||dSd}~XYnX|||||jdS)N)rWrZrjr'r%rrr))r-rrr+r$rrrrr do_longlists   zPdb.do_longlistc Csly||}Wn dSyt|\}}Wn0ttfk rZ}z||dSd}~XYnX|||dS)N)r!r%r TypeErrorrr))r-rr#r$rrrrr do_sources z Pdb.do_sourcerc Cs|r|j}|j|d}nd}}xt||D]|\}}t|d} t| dkrX| d7} ||krj| d7} n| d7} ||kr| d7} n||kr| d7} || d|q.WdS) NrurrBz->z>> ) rkr<rrrrjustrrOr) r-r$rrrQZcurrent_linenoZ exc_linenorrsrrrr)s    zPdb._print_linescCsy||}Wn dSd}y |j}Wntk r<YnX|rV|d|jdSy |jj}Wntk rvYnX|r|d|jdS|jtkr|d|j|j fdS|t|dS)Nz Function %sz Method %sz Class %s.%s) r!rrrOrr __class__typerr)r-rvaluer)rrr do_whatiss.   z Pdb.do_whatiscCsp|s<|dx\|j|jiD]}|d|q$Wn0||}||j|ji|<|d||fdS)NzCurrently displaying:z%s: %rzdisplay %s: %r)rOr9rrWrr setdefault)r-rrvalrrr do_display6s  zPdb.do_displaycCsT|r@y|j|ji|=WqPtk r<|d|YqPXn|j|jddS)Nznot displaying %s)r9rrWrrrc)r-rrrr do_undisplayIs zPdb.do_undisplaycsfdd|j|jiDS)Ncsg|]}|r|qSr)r)rr )rrrrYsz*Pdb.complete_undisplay..)r9rrW)r-rrrrr)rrcomplete_undisplayXszPdb.complete_undisplaycCs*|jj}||jtjd|ddS)Nz *interactive*)Zlocal)rWr!rrr]r)interact)r-rrrrr do_interact\s  zPdb.do_interactcCs|}t|dkrLt|j}x$|D]}|d||j|fq(WdS|d|jkrt|dkr|d|d|j|dfnd|dd|j|d<dS)Nrz%s = %srr)rrsortedr8rrOr)r-rrrrrrrdo_aliasfs  "z Pdb.do_aliascCs6|}t|dkrdS|d|jkr2|j|d=dS)Nr)rrr8)r-rrrrr do_unaliass  zPdb.do_unaliascsfdd|jDS)Ncsg|]}|r|qSr)r)ra)rrrrsz(Pdb.complete_unalias..)r8)r-rrrrr)rrcomplete_unaliasszPdb.complete_unaliasr rrr rrcCs8yx|jD]}||q WWntk r2YnXdS)N)rUrqrN)r- frame_linenorrrrs  zPdb.print_stack_tracecCs6|\}}||jkrd}nd}|||||dS)Nz> z )rWrOZformat_stack_entry)r-rEZ prompt_prefixrQrr}rrrrqs  zPdb.print_stack_entrycCs|stj||Sy}xtj |rt |}qWtj||}tj|r|SqWdS)Nrr1z.py) rBrCisabsexistsrrrir:splitextislinkreadlink)r-rr_rootZextdirnamefullnamerrrrs"   zPdb.lookupmodulec Csrd|_d|_ddl}||\}}}||j|_ddl}|j |j d|j|j |j |t d||dS)NTFr__main__)r__file__ __package__ __loader____spec__ __builtins__)r;rrunpyZ_get_module_detailsrirjr:rT__dict__rXrparentloaderrYr)r-Z module_namerZZmod_nameZmod_specr)rTrrr _runmodules  zPdb._runmodulec Cstddl}|j|jd|tdd|_|||_d|_t |d}d| |jf}WdQRX| |dS)NrrT)rrUrYTFrbzexec(compile(%r, %r, 'exec'))) rTr[rXrrYr;rir:rrreadr)r-rrTr statementrrr _runscripts    zPdb._runscript)r/NNNFT)r)N)rN)wrrrrr4rRrSrTrar^rhrmrlrtr~rrrrgrrrrerrOrrrrrZcomplete_commandsrrZdo_bZcomplete_breakZ complete_brZcomplete_tbreakrrrZcomplete_enablerZcomplete_disablerZcomplete_conditionrZcomplete_ignorerZdo_clZcomplete_clearZ complete_clrZdo_wZdo_btrrZdo_urZdo_drZdo_untrZdo_srZdo_nr Z do_restartr Zdo_rr Zdo_cZdo_contrZdo_jrZcomplete_debugrZdo_qZdo_exitrrZdo_ar Zdo_rvr!rr"r$Zcomplete_printZ complete_pZ complete_ppr,Zdo_lr-Zdo_llr/Zcomplete_sourcer)r8Zcomplete_whatisr;Zcomplete_displayr<r=r?rArBrDrr line_prefixrqrFZdo_hrJrKrr^rbrrrrr s -     M ]!!.    1  ! #    whereZdownZupbreakZtbreakrXrrrZ conditionrFsteprZuntilZjumpreturnZretvalcontinuer&ZlonglistrrppZwhatissourceZdisplayZ undisplayr>rZunaliasdebugquitrz cCst|||dS)N)r r)rarrrrrr7scCst|||S)N)r r )Z expressionrrrrrr :scCst|||dS)N)r)rarrrrrr =scOstj||S)N)r r )rkwdsrrrr As)headercCs,t}|dk r|||tjdS)N)r rOrr _getframef_back)rnpdbrrrrDs cCsB|dkrtd}|dkr$tdt}||d|dS)NrzAA valid traceback must be passed if no exception is being handled)rryrr rSrg)trrrrrLs cCsttjdS)N)rrlast_tracebackrrrrr Zszimport x; x.main()cCs ttdS)N)rTESTCMDrrrrtestbsrucCsddl}|tdS)Nr)pydocZpagerrI)rvrrrrfsausage: pdb.py [-c command] ... [-m module | pyfile] [arg] ... Debug the Python program given by pyfile. Alternatively, an executable module or package to debug can be specified using the -m switch. Initial commands are read from .pdbrc files in your home directory and in the current directory, if they exist. Commands supplied with -c are executed after commands from .pdbrc files. To let the script run until an exception occurs, use "-c continue". To let the script run up to a given line X in the debugged file, use "-c 'until X'".c Cs ddl}|tjdddddg\}}|s>tttdg}d}xJ|D]B\}}|dkrntttqL|d kr||qL|d krLd }qLW|d}|stj |std |d td|tjdd<|stj |tjd<t }|j |x y2|r||n |||jr"PtdWqtk r`td|dtdd|Yqtk rtdddttdYqtk rttdYqttdtdtd} |d| td|dYqXqWdS)Nrrzmhc:rzcommand=rF)z-hz--help)z-cz --command)z-mTzError:zdoes not existz*The program finished and will be restartedZ Restartingzwith arguments:r2rz/The program exited via sys.exit(). Exit status:)rz2Uncaught exception. Entering post mortem debuggingz1Running 'cont' or 'step' will restart the programz#Post mortem debugger finished. The z will be restarted)getoptrr r_usageexitrrBrCrMrRr rArEr^rbrrr SystemExitry SyntaxErrorrw print_excrg) rwZoptsrrFZ run_as_moduleoptZoptargr:rqrrrrrmainysb              r~rT)NN)NN)N)-rBrrr5r2r'r)rr#rr rwrrr__all__rr%r+rr,rcr3r6r rIZ _help_orderZ_commandrordrJrr r r rrr rtrurrxr~rrqrrrrFsr    '  "    C