home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text, with CR line terminators
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[CR]
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [R*ch] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 63 68 61 70 74 65 72 | 7b 54 68 65 20 50 79 74 |\chapter|{The Pyt|
|00000010| 68 6f 6e 20 44 65 62 75 | 67 67 65 72 7d 0d 5c 73 |hon Debu|gger}.\s|
|00000020| 74 6d 6f 64 69 6e 64 65 | 78 7b 70 64 62 7d 0d 5c |tmodinde|x{pdb}.\|
|00000030| 69 6e 64 65 78 7b 64 65 | 62 75 67 67 69 6e 67 7d |index{de|bugging}|
|00000040| 0d 0d 5c 72 65 6e 65 77 | 63 6f 6d 6d 61 6e 64 7b |..\renew|command{|
|00000050| 5c 69 6e 64 65 78 73 75 | 62 69 74 65 6d 7d 7b 28 |\indexsu|bitem}{(|
|00000060| 69 6e 20 6d 6f 64 75 6c | 65 20 70 64 62 29 7d 0d |in modul|e pdb)}.|
|00000070| 0d 54 68 65 20 6d 6f 64 | 75 6c 65 20 5c 63 6f 64 |.The mod|ule \cod|
|00000080| 65 7b 70 64 62 7d 20 64 | 65 66 69 6e 65 73 20 61 |e{pdb} d|efines a|
|00000090| 6e 20 69 6e 74 65 72 61 | 63 74 69 76 65 20 73 6f |n intera|ctive so|
|000000a0| 75 72 63 65 20 63 6f 64 | 65 20 64 65 62 75 67 67 |urce cod|e debugg|
|000000b0| 65 72 20 66 6f 72 0d 50 | 79 74 68 6f 6e 20 70 72 |er for.P|ython pr|
|000000c0| 6f 67 72 61 6d 73 2e 20 | 20 49 74 20 73 75 70 70 |ograms. | It supp|
|000000d0| 6f 72 74 73 20 73 65 74 | 74 69 6e 67 20 62 72 65 |orts set|ting bre|
|000000e0| 61 6b 70 6f 69 6e 74 73 | 20 61 6e 64 20 73 69 6e |akpoints| and sin|
|000000f0| 67 6c 65 20 73 74 65 70 | 70 69 6e 67 0d 61 74 20 |gle step|ping.at |
|00000100| 74 68 65 20 73 6f 75 72 | 63 65 20 6c 69 6e 65 20 |the sour|ce line |
|00000110| 6c 65 76 65 6c 2c 20 69 | 6e 73 70 65 63 74 69 6f |level, i|nspectio|
|00000120| 6e 20 6f 66 20 73 74 61 | 63 6b 20 66 72 61 6d 65 |n of sta|ck frame|
|00000130| 73 2c 20 73 6f 75 72 63 | 65 20 63 6f 64 65 0d 6c |s, sourc|e code.l|
|00000140| 69 73 74 69 6e 67 2c 20 | 61 6e 64 20 65 76 61 6c |isting, |and eval|
|00000150| 75 61 74 69 6f 6e 20 6f | 66 20 61 72 62 69 74 72 |uation o|f arbitr|
|00000160| 61 72 79 20 50 79 74 68 | 6f 6e 20 63 6f 64 65 20 |ary Pyth|on code |
|00000170| 69 6e 20 74 68 65 20 63 | 6f 6e 74 65 78 74 20 6f |in the c|ontext o|
|00000180| 66 20 61 6e 79 0d 73 74 | 61 63 6b 20 66 72 61 6d |f any.st|ack fram|
|00000190| 65 2e 20 20 49 74 20 61 | 6c 73 6f 20 73 75 70 70 |e. It a|lso supp|
|000001a0| 6f 72 74 73 20 70 6f 73 | 74 2d 6d 6f 72 74 65 6d |orts pos|t-mortem|
|000001b0| 20 64 65 62 75 67 67 69 | 6e 67 20 61 6e 64 20 63 | debuggi|ng and c|
|000001c0| 61 6e 20 62 65 20 63 61 | 6c 6c 65 64 0d 75 6e 64 |an be ca|lled.und|
|000001d0| 65 72 20 70 72 6f 67 72 | 61 6d 20 63 6f 6e 74 72 |er progr|am contr|
|000001e0| 6f 6c 2e 0d 0d 54 68 65 | 20 64 65 62 75 67 67 65 |ol...The| debugge|
|000001f0| 72 20 69 73 20 65 78 74 | 65 6e 73 69 62 6c 65 20 |r is ext|ensible |
|00000200| 2d 2d 2d 20 69 74 20 69 | 73 20 61 63 74 75 61 6c |--- it i|s actual|
|00000210| 6c 79 20 64 65 66 69 6e | 65 64 20 61 73 20 61 20 |ly defin|ed as a |
|00000220| 63 6c 61 73 73 0d 5c 63 | 6f 64 65 7b 50 64 62 7d |class.\c|ode{Pdb}|
|00000230| 2e 20 20 54 68 69 73 20 | 69 73 20 63 75 72 72 65 |. This |is curre|
|00000240| 6e 74 6c 79 20 75 6e 64 | 6f 63 75 6d 65 6e 74 65 |ntly und|ocumente|
|00000250| 64 20 62 75 74 20 65 61 | 73 69 6c 79 20 75 6e 64 |d but ea|sily und|
|00000260| 65 72 73 74 6f 6f 64 20 | 62 79 0d 72 65 61 64 69 |erstood |by.readi|
|00000270| 6e 67 20 74 68 65 20 73 | 6f 75 72 63 65 2e 20 20 |ng the s|ource. |
|00000280| 54 68 65 20 65 78 74 65 | 6e 73 69 6f 6e 20 69 6e |The exte|nsion in|
|00000290| 74 65 72 66 61 63 65 20 | 75 73 65 73 20 74 68 65 |terface |uses the|
|000002a0| 20 28 61 6c 73 6f 0d 75 | 6e 64 6f 63 75 6d 65 6e | (also.u|ndocumen|
|000002b0| 74 65 64 29 20 6d 6f 64 | 75 6c 65 73 20 5c 63 6f |ted) mod|ules \co|
|000002c0| 64 65 7b 62 64 62 7d 20 | 61 6e 64 20 5c 63 6f 64 |de{bdb} |and \cod|
|000002d0| 65 7b 63 6d 64 7d 2e 0d | 5c 74 74 69 6e 64 65 78 |e{cmd}..|\ttindex|
|000002e0| 7b 50 64 62 7d 0d 5c 74 | 74 69 6e 64 65 78 7b 62 |{Pdb}.\t|tindex{b|
|000002f0| 64 62 7d 0d 5c 74 74 69 | 6e 64 65 78 7b 63 6d 64 |db}.\tti|ndex{cmd|
|00000300| 7d 0d 0d 41 20 70 72 69 | 6d 69 74 69 76 65 20 77 |}..A pri|mitive w|
|00000310| 69 6e 64 6f 77 69 6e 67 | 20 76 65 72 73 69 6f 6e |indowing| version|
|00000320| 20 6f 66 20 74 68 65 20 | 64 65 62 75 67 67 65 72 | of the |debugger|
|00000330| 20 61 6c 73 6f 20 65 78 | 69 73 74 73 20 2d 2d 2d | also ex|ists ---|
|00000340| 20 74 68 69 73 20 69 73 | 0d 6d 6f 64 75 6c 65 20 | this is|.module |
|00000350| 5c 63 6f 64 65 7b 77 64 | 62 7d 2c 20 77 68 69 63 |\code{wd|b}, whic|
|00000360| 68 20 72 65 71 75 69 72 | 65 73 20 53 54 44 57 49 |h requir|es STDWI|
|00000370| 4e 20 28 73 65 65 20 74 | 68 65 20 63 68 61 70 74 |N (see t|he chapt|
|00000380| 65 72 20 6f 6e 20 53 54 | 44 57 49 4e 0d 73 70 65 |er on ST|DWIN.spe|
|00000390| 63 69 66 69 63 20 6d 6f | 64 75 6c 65 73 29 2e 0d |cific mo|dules)..|
|000003a0| 5c 69 6e 64 65 78 7b 73 | 74 64 77 69 6e 7d 0d 5c |\index{s|tdwin}.\|
|000003b0| 74 74 69 6e 64 65 78 7b | 77 64 62 7d 0d 0d 54 68 |ttindex{|wdb}..Th|
|000003c0| 65 20 64 65 62 75 67 67 | 65 72 27 73 20 70 72 6f |e debugg|er's pro|
|000003d0| 6d 70 74 20 69 73 20 60 | 60 5c 63 6f 64 65 7b 28 |mpt is `|`\code{(|
|000003e0| 50 64 62 29 20 7d 27 27 | 2e 0d 54 79 70 69 63 61 |Pdb) }''|..Typica|
|000003f0| 6c 20 75 73 61 67 65 20 | 74 6f 20 72 75 6e 20 61 |l usage |to run a|
|00000400| 20 70 72 6f 67 72 61 6d | 20 75 6e 64 65 72 20 63 | program| under c|
|00000410| 6f 6e 74 72 6f 6c 20 6f | 66 20 74 68 65 20 64 65 |ontrol o|f the de|
|00000420| 62 75 67 67 65 72 20 69 | 73 3a 0d 0d 5c 62 65 67 |bugger i|s:..\beg|
|00000430| 69 6e 7b 76 65 72 62 61 | 74 69 6d 7d 0d 3e 3e 3e |in{verba|tim}.>>>|
|00000440| 20 69 6d 70 6f 72 74 20 | 70 64 62 0d 3e 3e 3e 20 | import |pdb.>>> |
|00000450| 69 6d 70 6f 72 74 20 6d | 79 6d 6f 64 75 6c 65 0d |import m|ymodule.|
|00000460| 3e 3e 3e 20 70 64 62 2e | 72 75 6e 28 27 6d 79 6d |>>> pdb.|run('mym|
|00000470| 6f 64 75 6c 65 2e 74 65 | 73 74 28 29 27 29 0d 3e |odule.te|st()').>|
|00000480| 20 3c 73 74 72 69 6e 67 | 3e 28 30 29 3f 28 29 0d | <string|>(0)?().|
|00000490| 28 50 64 62 29 20 63 6f | 6e 74 69 6e 75 65 0d 3e |(Pdb) co|ntinue.>|
|000004a0| 20 3c 73 74 72 69 6e 67 | 3e 28 31 29 3f 28 29 0d | <string|>(1)?().|
|000004b0| 28 50 64 62 29 20 63 6f | 6e 74 69 6e 75 65 0d 4e |(Pdb) co|ntinue.N|
|000004c0| 61 6d 65 45 72 72 6f 72 | 3a 20 27 73 70 61 6d 27 |ameError|: 'spam'|
|000004d0| 0d 3e 20 3c 73 74 72 69 | 6e 67 3e 28 31 29 3f 28 |.> <stri|ng>(1)?(|
|000004e0| 29 0d 28 50 64 62 29 20 | 0d 5c 65 6e 64 7b 76 65 |).(Pdb) |.\end{ve|
|000004f0| 72 62 61 74 69 6d 7d 0d | 0d 54 79 70 69 63 61 6c |rbatim}.|.Typical|
|00000500| 20 75 73 61 67 65 20 74 | 6f 20 69 6e 73 70 65 63 | usage t|o inspec|
|00000510| 74 20 61 20 63 72 61 73 | 68 65 64 20 70 72 6f 67 |t a cras|hed prog|
|00000520| 72 61 6d 20 69 73 3a 0d | 0d 5c 62 65 67 69 6e 7b |ram is:.|.\begin{|
|00000530| 76 65 72 62 61 74 69 6d | 7d 0d 3e 3e 3e 20 69 6d |verbatim|}.>>> im|
|00000540| 70 6f 72 74 20 70 64 62 | 0d 3e 3e 3e 20 69 6d 70 |port pdb|.>>> imp|
|00000550| 6f 72 74 20 6d 79 6d 6f | 64 75 6c 65 0d 3e 3e 3e |ort mymo|dule.>>>|
|00000560| 20 6d 79 6d 6f 64 75 6c | 65 2e 74 65 73 74 28 29 | mymodul|e.test()|
|00000570| 0d 54 72 61 63 65 62 61 | 63 6b 20 28 69 6e 6e 65 |.Traceba|ck (inne|
|00000580| 72 6d 6f 73 74 20 6c 61 | 73 74 29 3a 0d 20 20 46 |rmost la|st):. F|
|00000590| 69 6c 65 20 22 3c 73 74 | 64 69 6e 3e 22 2c 20 6c |ile "<st|din>", l|
|000005a0| 69 6e 65 20 31 2c 20 69 | 6e 20 3f 0d 20 20 46 69 |ine 1, i|n ?. Fi|
|000005b0| 6c 65 20 22 2e 2f 6d 79 | 6d 6f 64 75 6c 65 2e 70 |le "./my|module.p|
|000005c0| 79 22 2c 20 6c 69 6e 65 | 20 34 2c 20 69 6e 20 74 |y", line| 4, in t|
|000005d0| 65 73 74 0d 20 20 20 20 | 74 65 73 74 32 28 29 0d |est. |test2().|
|000005e0| 20 20 46 69 6c 65 20 22 | 2e 2f 6d 79 6d 6f 64 75 | File "|./mymodu|
|000005f0| 6c 65 2e 70 79 22 2c 20 | 6c 69 6e 65 20 33 2c 20 |le.py", |line 3, |
|00000600| 69 6e 20 74 65 73 74 32 | 0d 20 20 20 20 70 72 69 |in test2|. pri|
|00000610| 6e 74 20 73 70 61 6d 0d | 4e 61 6d 65 45 72 72 6f |nt spam.|NameErro|
|00000620| 72 3a 20 73 70 61 6d 0d | 3e 3e 3e 20 70 64 62 2e |r: spam.|>>> pdb.|
|00000630| 70 6d 28 29 0d 3e 20 2e | 2f 6d 79 6d 6f 64 75 6c |pm().> .|/mymodul|
|00000640| 65 2e 70 79 28 33 29 74 | 65 73 74 32 28 29 0d 2d |e.py(3)t|est2().-|
|00000650| 3e 20 70 72 69 6e 74 20 | 73 70 61 6d 0d 28 50 64 |> print |spam.(Pd|
|00000660| 62 29 20 0d 5c 65 6e 64 | 7b 76 65 72 62 61 74 69 |b) .\end|{verbati|
|00000670| 6d 7d 0d 0d 54 68 65 20 | 6d 6f 64 75 6c 65 20 64 |m}..The |module d|
|00000680| 65 66 69 6e 65 73 20 74 | 68 65 20 66 6f 6c 6c 6f |efines t|he follo|
|00000690| 77 69 6e 67 20 66 75 6e | 63 74 69 6f 6e 73 3b 20 |wing fun|ctions; |
|000006a0| 65 61 63 68 20 65 6e 74 | 65 72 73 20 74 68 65 20 |each ent|ers the |
|000006b0| 64 65 62 75 67 67 65 72 | 0d 69 6e 20 61 20 73 6c |debugger|.in a sl|
|000006c0| 69 67 68 74 6c 79 20 64 | 69 66 66 65 72 65 6e 74 |ightly d|ifferent|
|000006d0| 20 77 61 79 3a 0d 0d 5c | 62 65 67 69 6e 7b 66 75 | way:..\|begin{fu|
|000006e0| 6e 63 64 65 73 63 7d 7b | 72 75 6e 7d 7b 73 74 61 |ncdesc}{|run}{sta|
|000006f0| 74 65 6d 65 6e 74 5c 6f | 70 74 69 6f 6e 61 6c 7b |tement\o|ptional{|
|00000700| 5c 2c 20 67 6c 6f 62 61 | 6c 73 5c 6f 70 74 69 6f |\, globa|ls\optio|
|00000710| 6e 61 6c 7b 5c 2c 20 6c | 6f 63 61 6c 73 7d 7d 7d |nal{\, l|ocals}}}|
|00000720| 0d 45 78 65 63 75 74 65 | 20 74 68 65 20 5c 76 61 |.Execute| the \va|
|00000730| 72 7b 73 74 61 74 65 6d | 65 6e 74 7d 20 28 67 69 |r{statem|ent} (gi|
|00000740| 76 65 6e 20 61 73 20 61 | 20 73 74 72 69 6e 67 29 |ven as a| string)|
|00000750| 20 75 6e 64 65 72 20 64 | 65 62 75 67 67 65 72 0d | under d|ebugger.|
|00000760| 63 6f 6e 74 72 6f 6c 2e | 20 20 54 68 65 20 64 65 |control.| The de|
|00000770| 62 75 67 67 65 72 20 70 | 72 6f 6d 70 74 20 61 70 |bugger p|rompt ap|
|00000780| 70 65 61 72 73 20 62 65 | 66 6f 72 65 20 61 6e 79 |pears be|fore any|
|00000790| 20 63 6f 64 65 20 69 73 | 20 65 78 65 63 75 74 65 | code is| execute|
|000007a0| 64 3b 20 79 6f 75 0d 63 | 61 6e 20 73 65 74 20 62 |d; you.c|an set b|
|000007b0| 72 65 61 6b 70 6f 69 6e | 74 73 20 61 6e 64 20 74 |reakpoin|ts and t|
|000007c0| 79 70 65 20 5c 63 6f 64 | 65 7b 63 6f 6e 74 69 6e |ype \cod|e{contin|
|000007d0| 75 65 7d 2c 20 6f 72 20 | 79 6f 75 20 63 61 6e 20 |ue}, or |you can |
|000007e0| 73 74 65 70 20 74 68 72 | 6f 75 67 68 0d 74 68 65 |step thr|ough.the|
|000007f0| 20 73 74 61 74 65 6d 65 | 6e 74 20 75 73 69 6e 67 | stateme|nt using|
|00000800| 20 5c 63 6f 64 65 7b 73 | 74 65 70 7d 20 6f 72 20 | \code{s|tep} or |
|00000810| 5c 63 6f 64 65 7b 6e 65 | 78 74 7d 20 28 61 6c 6c |\code{ne|xt} (all|
|00000820| 20 74 68 65 73 65 20 63 | 6f 6d 6d 61 6e 64 73 20 | these c|ommands |
|00000830| 61 72 65 0d 65 78 70 6c | 61 69 6e 65 64 20 62 65 |are.expl|ained be|
|00000840| 6c 6f 77 29 2e 20 20 54 | 68 65 20 6f 70 74 69 6f |low). T|he optio|
|00000850| 6e 61 6c 20 5c 76 61 72 | 7b 67 6c 6f 62 61 6c 73 |nal \var|{globals|
|00000860| 7d 20 61 6e 64 20 5c 76 | 61 72 7b 6c 6f 63 61 6c |} and \v|ar{local|
|00000870| 73 7d 0d 61 72 67 75 6d | 65 6e 74 73 20 73 70 65 |s}.argum|ents spe|
|00000880| 63 69 66 79 20 74 68 65 | 20 65 6e 76 69 72 6f 6e |cify the| environ|
|00000890| 6d 65 6e 74 20 69 6e 20 | 77 68 69 63 68 20 74 68 |ment in |which th|
|000008a0| 65 20 63 6f 64 65 20 69 | 73 20 65 78 65 63 75 74 |e code i|s execut|
|000008b0| 65 64 3b 20 62 79 0d 64 | 65 66 61 75 6c 74 20 74 |ed; by.d|efault t|
|000008c0| 68 65 20 64 69 63 74 69 | 6f 6e 61 72 79 20 6f 66 |he dicti|onary of|
|000008d0| 20 74 68 65 20 6d 6f 64 | 75 6c 65 20 5c 63 6f 64 | the mod|ule \cod|
|000008e0| 65 7b 5f 5f 6d 61 69 6e | 5f 5f 7d 20 69 73 20 75 |e{__main|__} is u|
|000008f0| 73 65 64 2e 20 20 28 53 | 65 65 0d 74 68 65 20 65 |sed. (S|ee.the e|
|00000900| 78 70 6c 61 6e 61 74 69 | 6f 6e 20 6f 66 20 74 68 |xplanati|on of th|
|00000910| 65 20 5c 63 6f 64 65 7b | 65 78 65 63 7d 20 73 74 |e \code{|exec} st|
|00000920| 61 74 65 6d 65 6e 74 20 | 6f 72 20 74 68 65 20 5c |atement |or the \|
|00000930| 63 6f 64 65 7b 65 76 61 | 6c 28 29 7d 0d 62 75 69 |code{eva|l()}.bui|
|00000940| 6c 74 2d 69 6e 20 66 75 | 6e 63 74 69 6f 6e 2e 29 |lt-in fu|nction.)|
|00000950| 0d 5c 65 6e 64 7b 66 75 | 6e 63 64 65 73 63 7d 0d |.\end{fu|ncdesc}.|
|00000960| 0d 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |.\begin{|funcdesc|
|00000970| 7d 7b 72 75 6e 65 76 61 | 6c 7d 7b 65 78 70 72 65 |}{runeva|l}{expre|
|00000980| 73 73 69 6f 6e 5c 6f 70 | 74 69 6f 6e 61 6c 7b 5c |ssion\op|tional{\|
|00000990| 2c 20 67 6c 6f 62 61 6c | 73 5c 6f 70 74 69 6f 6e |, global|s\option|
|000009a0| 61 6c 7b 5c 2c 20 6c 6f | 63 61 6c 73 7d 7d 7d 0d |al{\, lo|cals}}}.|
|000009b0| 45 76 61 6c 75 61 74 65 | 20 74 68 65 20 5c 76 61 |Evaluate| the \va|
|000009c0| 72 7b 65 78 70 72 65 73 | 73 69 6f 6e 7d 20 28 67 |r{expres|sion} (g|
|000009d0| 69 76 65 6e 20 61 73 20 | 61 20 61 20 73 74 72 69 |iven as |a a stri|
|000009e0| 6e 67 29 20 75 6e 64 65 | 72 20 64 65 62 75 67 67 |ng) unde|r debugg|
|000009f0| 65 72 0d 63 6f 6e 74 72 | 6f 6c 2e 20 20 57 68 65 |er.contr|ol. Whe|
|00000a00| 6e 20 5c 63 6f 64 65 7b | 72 75 6e 65 76 61 6c 28 |n \code{|runeval(|
|00000a10| 29 7d 20 72 65 74 75 72 | 6e 73 2c 20 69 74 20 72 |)} retur|ns, it r|
|00000a20| 65 74 75 72 6e 73 20 74 | 68 65 20 76 61 6c 75 65 |eturns t|he value|
|00000a30| 20 6f 66 20 74 68 65 0d | 65 78 70 72 65 73 73 69 | of the.|expressi|
|00000a40| 6f 6e 2e 20 20 4f 74 68 | 65 72 77 69 73 65 20 74 |on. Oth|erwise t|
|00000a50| 68 69 73 20 66 75 6e 63 | 74 69 6f 6e 20 69 73 20 |his func|tion is |
|00000a60| 73 69 6d 69 6c 61 72 20 | 74 6f 0d 5c 63 6f 64 65 |similar |to.\code|
|00000a70| 7b 72 75 6e 28 29 7d 2e | 0d 5c 65 6e 64 7b 66 75 |{run()}.|.\end{fu|
|00000a80| 6e 63 64 65 73 63 7d 0d | 0d 5c 62 65 67 69 6e 7b |ncdesc}.|.\begin{|
|00000a90| 66 75 6e 63 64 65 73 63 | 7d 7b 72 75 6e 63 61 6c |funcdesc|}{runcal|
|00000aa0| 6c 7d 7b 66 75 6e 63 74 | 69 6f 6e 5c 6f 70 74 69 |l}{funct|ion\opti|
|00000ab0| 6f 6e 61 6c 7b 5c 2c 20 | 61 72 67 75 6d 65 6e 74 |onal{\, |argument|
|00000ac0| 5c 2c 20 2e 2e 2e 7d 7d | 0d 43 61 6c 6c 20 74 68 |\, ...}}|.Call th|
|00000ad0| 65 20 5c 76 61 72 7b 66 | 75 6e 63 74 69 6f 6e 7d |e \var{f|unction}|
|00000ae0| 20 28 61 20 66 75 6e 63 | 74 69 6f 6e 20 6f 72 20 | (a func|tion or |
|00000af0| 6d 65 74 68 6f 64 20 6f | 62 6a 65 63 74 2c 20 6e |method o|bject, n|
|00000b00| 6f 74 20 61 20 73 74 72 | 69 6e 67 29 0d 77 69 74 |ot a str|ing).wit|
|00000b10| 68 20 74 68 65 20 67 69 | 76 65 6e 20 61 72 67 75 |h the gi|ven argu|
|00000b20| 6d 65 6e 74 73 2e 20 20 | 57 68 65 6e 20 5c 63 6f |ments. |When \co|
|00000b30| 64 65 7b 72 75 6e 63 61 | 6c 6c 28 29 7d 20 72 65 |de{runca|ll()} re|
|00000b40| 74 75 72 6e 73 2c 20 69 | 74 20 72 65 74 75 72 6e |turns, i|t return|
|00000b50| 73 0d 77 68 61 74 65 76 | 65 72 20 74 68 65 20 66 |s.whatev|er the f|
|00000b60| 75 6e 63 74 69 6f 6e 20 | 63 61 6c 6c 20 72 65 74 |unction |call ret|
|00000b70| 75 72 6e 65 64 2e 20 20 | 54 68 65 20 64 65 62 75 |urned. |The debu|
|00000b80| 67 67 65 72 20 70 72 6f | 6d 70 74 20 61 70 70 65 |gger pro|mpt appe|
|00000b90| 61 72 73 20 61 73 0d 73 | 6f 6f 6e 20 61 73 20 74 |ars as.s|oon as t|
|00000ba0| 68 65 20 66 75 6e 63 74 | 69 6f 6e 20 69 73 20 65 |he funct|ion is e|
|00000bb0| 6e 74 65 72 65 64 2e 0d | 5c 65 6e 64 7b 66 75 6e |ntered..|\end{fun|
|00000bc0| 63 64 65 73 63 7d 0d 0d | 5c 62 65 67 69 6e 7b 66 |cdesc}..|\begin{f|
|00000bd0| 75 6e 63 64 65 73 63 7d | 7b 73 65 74 5f 74 72 61 |uncdesc}|{set_tra|
|00000be0| 63 65 7d 7b 7d 0d 45 6e | 74 65 72 20 74 68 65 20 |ce}{}.En|ter the |
|00000bf0| 64 65 62 75 67 67 65 72 | 20 61 74 20 74 68 65 20 |debugger| at the |
|00000c00| 63 61 6c 6c 69 6e 67 20 | 73 74 61 63 6b 20 66 72 |calling |stack fr|
|00000c10| 61 6d 65 2e 20 20 54 68 | 69 73 20 69 73 20 75 73 |ame. Th|is is us|
|00000c20| 65 66 75 6c 20 74 6f 0d | 68 61 72 64 2d 63 6f 64 |eful to.|hard-cod|
|00000c30| 65 20 61 20 62 72 65 61 | 6b 70 6f 69 6e 74 20 61 |e a brea|kpoint a|
|00000c40| 74 20 61 20 67 69 76 65 | 6e 20 70 6f 69 6e 74 20 |t a give|n point |
|00000c50| 69 6e 20 61 20 70 72 6f | 67 72 61 6d 2c 20 65 76 |in a pro|gram, ev|
|00000c60| 65 6e 20 69 66 20 74 68 | 65 20 63 6f 64 65 0d 69 |en if th|e code.i|
|00000c70| 73 20 6e 6f 74 20 6f 74 | 68 65 72 77 69 73 65 20 |s not ot|herwise |
|00000c80| 62 65 69 6e 67 20 64 65 | 62 75 67 67 65 64 20 28 |being de|bugged (|
|00000c90| 65 2e 67 2e 20 77 68 65 | 6e 20 61 6e 20 61 73 73 |e.g. whe|n an ass|
|00000ca0| 65 72 74 69 6f 6e 20 66 | 61 69 6c 73 29 2e 0d 5c |ertion f|ails)..\|
|00000cb0| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 0d 0d 5c |end{func|desc}..\|
|00000cc0| 62 65 67 69 6e 7b 66 75 | 6e 63 64 65 73 63 7d 7b |begin{fu|ncdesc}{|
|00000cd0| 70 6f 73 74 5f 6d 6f 72 | 74 65 6d 7d 7b 74 72 61 |post_mor|tem}{tra|
|00000ce0| 63 65 62 61 63 6b 7d 0d | 45 6e 74 65 72 20 70 6f |ceback}.|Enter po|
|00000cf0| 73 74 2d 6d 6f 72 74 65 | 6d 20 64 65 62 75 67 67 |st-morte|m debugg|
|00000d00| 69 6e 67 20 6f 66 20 74 | 68 65 20 67 69 76 65 6e |ing of t|he given|
|00000d10| 20 5c 76 61 72 7b 74 72 | 61 63 65 62 61 63 6b 7d | \var{tr|aceback}|
|00000d20| 20 6f 62 6a 65 63 74 2e | 0d 5c 65 6e 64 7b 66 75 | object.|.\end{fu|
|00000d30| 6e 63 64 65 73 63 7d 0d | 0d 5c 62 65 67 69 6e 7b |ncdesc}.|.\begin{|
|00000d40| 66 75 6e 63 64 65 73 63 | 7d 7b 70 6d 7d 7b 7d 0d |funcdesc|}{pm}{}.|
|00000d50| 45 6e 74 65 72 20 70 6f | 73 74 2d 6d 6f 72 74 65 |Enter po|st-morte|
|00000d60| 6d 20 64 65 62 75 67 67 | 69 6e 67 20 6f 66 20 74 |m debugg|ing of t|
|00000d70| 68 65 20 74 72 61 63 65 | 62 61 63 6b 20 66 6f 75 |he trace|back fou|
|00000d80| 6e 64 20 69 6e 0d 5c 63 | 6f 64 65 7b 73 79 73 2e |nd in.\c|ode{sys.|
|00000d90| 6c 61 73 74 5f 74 72 61 | 63 65 62 61 63 6b 7d 2e |last_tra|ceback}.|
|00000da0| 0d 5c 65 6e 64 7b 66 75 | 6e 63 64 65 73 63 7d 0d |.\end{fu|ncdesc}.|
|00000db0| 0d 5c 73 65 63 74 69 6f | 6e 7b 44 65 62 75 67 67 |.\sectio|n{Debugg|
|00000dc0| 65 72 20 43 6f 6d 6d 61 | 6e 64 73 7d 0d 0d 54 68 |er Comma|nds}..Th|
|00000dd0| 65 20 64 65 62 75 67 67 | 65 72 20 72 65 63 6f 67 |e debugg|er recog|
|00000de0| 6e 69 7a 65 73 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |nizes th|e follow|
|00000df0| 69 6e 67 20 63 6f 6d 6d | 61 6e 64 73 2e 20 20 4d |ing comm|ands. M|
|00000e00| 6f 73 74 20 63 6f 6d 6d | 61 6e 64 73 20 63 61 6e |ost comm|ands can|
|00000e10| 20 62 65 0d 61 62 62 72 | 65 76 69 61 74 65 64 20 | be.abbr|eviated |
|00000e20| 74 6f 20 6f 6e 65 20 6f | 72 20 74 77 6f 20 6c 65 |to one o|r two le|
|00000e30| 74 74 65 72 73 3b 20 65 | 2e 67 2e 20 60 60 5c 63 |tters; e|.g. ``\c|
|00000e40| 6f 64 65 7b 68 28 65 6c | 70 29 7d 27 27 20 6d 65 |ode{h(el|p)}'' me|
|00000e50| 61 6e 73 20 74 68 61 74 | 0d 65 69 74 68 65 72 20 |ans that|.either |
|00000e60| 60 60 5c 63 6f 64 65 7b | 68 7d 27 27 20 6f 72 20 |``\code{|h}'' or |
|00000e70| 60 60 5c 63 6f 64 65 7b | 68 65 6c 70 7d 27 27 20 |``\code{|help}'' |
|00000e80| 63 61 6e 20 62 65 20 75 | 73 65 64 20 74 6f 20 65 |can be u|sed to e|
|00000e90| 6e 74 65 72 20 74 68 65 | 20 68 65 6c 70 0d 63 6f |nter the| help.co|
|00000ea0| 6d 6d 61 6e 64 20 28 62 | 75 74 20 6e 6f 74 20 60 |mmand (b|ut not `|
|00000eb0| 60 5c 63 6f 64 65 7b 68 | 65 7d 27 27 20 6f 72 20 |`\code{h|e}'' or |
|00000ec0| 60 60 5c 63 6f 64 65 7b | 68 65 6c 7d 27 27 2c 20 |``\code{|hel}'', |
|00000ed0| 6e 6f 72 20 60 60 5c 63 | 6f 64 65 7b 48 7d 27 27 |nor ``\c|ode{H}''|
|00000ee0| 20 6f 72 0d 60 60 5c 63 | 6f 64 65 7b 48 65 6c 70 | or.``\c|ode{Help|
|00000ef0| 7d 20 6f 72 20 60 60 5c | 63 6f 64 65 7b 48 45 4c |} or ``\|code{HEL|
|00000f00| 50 7d 27 27 29 2e 20 20 | 41 72 67 75 6d 65 6e 74 |P}''). |Argument|
|00000f10| 73 20 74 6f 20 63 6f 6d | 6d 61 6e 64 73 20 6d 75 |s to com|mands mu|
|00000f20| 73 74 20 62 65 0d 73 65 | 70 61 72 61 74 65 64 20 |st be.se|parated |
|00000f30| 62 79 20 77 68 69 74 65 | 73 70 61 63 65 20 28 73 |by white|space (s|
|00000f40| 70 61 63 65 73 20 6f 72 | 20 74 61 62 73 29 2e 20 |paces or| tabs). |
|00000f50| 20 4f 70 74 69 6f 6e 61 | 6c 20 61 72 67 75 6d 65 | Optiona|l argume|
|00000f60| 6e 74 73 20 61 72 65 0d | 65 6e 63 6c 6f 73 65 64 |nts are.|enclosed|
|00000f70| 20 69 6e 20 73 71 75 61 | 72 65 20 62 72 61 63 6b | in squa|re brack|
|00000f80| 65 74 73 20 28 60 60 5c | 63 6f 64 65 7b 5b 5d 7d |ets (``\|code{[]}|
|00000f90| 27 27 29 20 69 6e 20 74 | 68 65 20 63 6f 6d 6d 61 |'') in t|he comma|
|00000fa0| 6e 64 20 73 79 6e 74 61 | 78 3b 20 74 68 65 0d 73 |nd synta|x; the.s|
|00000fb0| 71 75 61 72 65 20 62 72 | 61 63 6b 65 74 73 20 6d |quare br|ackets m|
|00000fc0| 75 73 74 20 6e 6f 74 20 | 62 65 20 74 79 70 65 64 |ust not |be typed|
|00000fd0| 2e 20 20 41 6c 74 65 72 | 6e 61 74 69 76 65 73 20 |. Alter|natives |
|00000fe0| 69 6e 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 20 73 |in the c|ommand s|
|00000ff0| 79 6e 74 61 78 0d 61 72 | 65 20 73 65 70 61 72 61 |yntax.ar|e separa|
|00001000| 74 65 64 20 62 79 20 61 | 20 76 65 72 74 69 63 61 |ted by a| vertica|
|00001010| 6c 20 62 61 72 20 28 60 | 60 5c 63 6f 64 65 7b 7c |l bar (`|`\code{||
|00001020| 7d 27 27 29 2e 0d 0d 45 | 6e 74 65 72 69 6e 67 20 |}'')...E|ntering |
|00001030| 61 20 62 6c 61 6e 6b 20 | 6c 69 6e 65 20 72 65 70 |a blank |line rep|
|00001040| 65 61 74 73 20 74 68 65 | 20 6c 61 73 74 20 63 6f |eats the| last co|
|00001050| 6d 6d 61 6e 64 20 65 6e | 74 65 72 65 64 2e 20 20 |mmand en|tered. |
|00001060| 45 78 63 65 70 74 69 6f | 6e 3a 20 69 66 0d 74 68 |Exceptio|n: if.th|
|00001070| 65 20 6c 61 73 74 20 63 | 6f 6d 6d 61 6e 64 20 77 |e last c|ommand w|
|00001080| 61 73 20 61 20 60 60 5c | 63 6f 64 65 7b 6c 69 73 |as a ``\|code{lis|
|00001090| 74 7d 27 27 20 63 6f 6d | 6d 61 6e 64 2c 20 74 68 |t}'' com|mand, th|
|000010a0| 65 20 6e 65 78 74 20 31 | 31 20 6c 69 6e 65 73 20 |e next 1|1 lines |
|000010b0| 61 72 65 0d 6c 69 73 74 | 65 64 2e 0d 0d 43 6f 6d |are.list|ed...Com|
|000010c0| 6d 61 6e 64 73 20 74 68 | 61 74 20 74 68 65 20 64 |mands th|at the d|
|000010d0| 65 62 75 67 67 65 72 20 | 64 6f 65 73 6e 27 74 20 |ebugger |doesn't |
|000010e0| 72 65 63 6f 67 6e 69 7a | 65 20 61 72 65 20 61 73 |recogniz|e are as|
|000010f0| 73 75 6d 65 64 20 74 6f | 20 62 65 20 50 79 74 68 |sumed to| be Pyth|
|00001100| 6f 6e 0d 73 74 61 74 65 | 6d 65 6e 74 73 20 61 6e |on.state|ments an|
|00001110| 64 20 61 72 65 20 65 78 | 65 63 75 74 65 64 20 69 |d are ex|ecuted i|
|00001120| 6e 20 74 68 65 20 63 6f | 6e 74 65 78 74 20 6f 66 |n the co|ntext of|
|00001130| 20 74 68 65 20 70 72 6f | 67 72 61 6d 20 62 65 69 | the pro|gram bei|
|00001140| 6e 67 0d 64 65 62 75 67 | 67 65 64 2e 20 20 50 79 |ng.debug|ged. Py|
|00001150| 74 68 6f 6e 20 73 74 61 | 74 65 6d 65 6e 74 73 20 |thon sta|tements |
|00001160| 63 61 6e 20 61 6c 73 6f | 20 62 65 20 70 72 65 66 |can also| be pref|
|00001170| 69 78 65 64 20 77 69 74 | 68 20 61 6e 20 65 78 63 |ixed wit|h an exc|
|00001180| 6c 61 6d 61 74 69 6f 6e | 0d 70 6f 69 6e 74 20 28 |lamation|.point (|
|00001190| 60 60 5c 63 6f 64 65 7b | 21 7d 27 27 29 2e 20 20 |``\code{|!}''). |
|000011a0| 54 68 69 73 20 69 73 20 | 61 20 70 6f 77 65 72 66 |This is |a powerf|
|000011b0| 75 6c 20 77 61 79 20 74 | 6f 20 69 6e 73 70 65 63 |ul way t|o inspec|
|000011c0| 74 20 74 68 65 20 70 72 | 6f 67 72 61 6d 0d 62 65 |t the pr|ogram.be|
|000011d0| 69 6e 67 20 64 65 62 75 | 67 67 65 64 3b 20 69 74 |ing debu|gged; it|
|000011e0| 20 69 73 20 65 76 65 6e | 20 70 6f 73 73 69 62 6c | is even| possibl|
|000011f0| 65 20 74 6f 20 63 68 61 | 6e 67 65 20 61 20 76 61 |e to cha|nge a va|
|00001200| 72 69 61 62 6c 65 20 6f | 72 20 63 61 6c 6c 20 61 |riable o|r call a|
|00001210| 0d 66 75 6e 63 74 69 6f | 6e 2e 20 20 57 68 65 6e |.functio|n. When|
|00001220| 20 61 6e 0d 65 78 63 65 | 70 74 69 6f 6e 20 6f 63 | an.exce|ption oc|
|00001230| 63 75 72 73 20 69 6e 20 | 73 75 63 68 20 61 20 73 |curs in |such a s|
|00001240| 74 61 74 65 6d 65 6e 74 | 2c 20 74 68 65 20 65 78 |tatement|, the ex|
|00001250| 63 65 70 74 69 6f 6e 20 | 6e 61 6d 65 20 69 73 20 |ception |name is |
|00001260| 70 72 69 6e 74 65 64 0d | 62 75 74 20 74 68 65 20 |printed.|but the |
|00001270| 64 65 62 75 67 67 65 72 | 27 73 20 73 74 61 74 65 |debugger|'s state|
|00001280| 20 69 73 20 6e 6f 74 20 | 63 68 61 6e 67 65 64 2e | is not |changed.|
|00001290| 0d 0d 5c 62 65 67 69 6e | 7b 64 65 73 63 72 69 70 |..\begin|{descrip|
|000012a0| 74 69 6f 6e 7d 0d 0d 5c | 69 74 65 6d 5b 68 28 65 |tion}..\|item[h(e|
|000012b0| 6c 70 29 20 5b 5c 76 61 | 72 7b 63 6f 6d 6d 61 6e |lp) [\va|r{comman|
|000012c0| 64 7d 5d 5d 0d 0d 57 69 | 74 68 6f 75 74 20 61 72 |d}]]..Wi|thout ar|
|000012d0| 67 75 6d 65 6e 74 2c 20 | 70 72 69 6e 74 20 74 68 |gument, |print th|
|000012e0| 65 20 6c 69 73 74 20 6f | 66 20 61 76 61 69 6c 61 |e list o|f availa|
|000012f0| 62 6c 65 20 63 6f 6d 6d | 61 6e 64 73 2e 0d 57 69 |ble comm|ands..Wi|
|00001300| 74 68 20 61 20 5c 76 61 | 72 7b 63 6f 6d 6d 61 6e |th a \va|r{comman|
|00001310| 64 7d 20 61 73 20 61 72 | 67 75 6d 65 6e 74 2c 20 |d} as ar|gument, |
|00001320| 70 72 69 6e 74 20 68 65 | 6c 70 20 61 62 6f 75 74 |print he|lp about|
|00001330| 20 74 68 61 74 20 63 6f | 6d 6d 61 6e 64 2e 0d 60 | that co|mmand..`|
|00001340| 60 5c 63 6f 64 65 7b 68 | 65 6c 70 20 70 64 62 7d |`\code{h|elp pdb}|
|00001350| 27 27 20 64 69 73 70 6c | 61 79 73 20 74 68 65 20 |'' displ|ays the |
|00001360| 66 75 6c 6c 20 64 6f 63 | 75 6d 65 6e 74 61 74 69 |full doc|umentati|
|00001370| 6f 6e 20 66 69 6c 65 3b | 20 69 66 20 74 68 65 0d |on file;| if the.|
|00001380| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 76 61 72 69 |environm|ent vari|
|00001390| 61 62 6c 65 20 5c 63 6f | 64 65 7b 50 41 47 45 52 |able \co|de{PAGER|
|000013a0| 7d 20 69 73 20 64 65 66 | 69 6e 65 64 2c 20 74 68 |} is def|ined, th|
|000013b0| 65 20 66 69 6c 65 20 69 | 73 20 70 69 70 65 64 0d |e file i|s piped.|
|000013c0| 74 68 72 6f 75 67 68 20 | 74 68 61 74 20 63 6f 6d |through |that com|
|000013d0| 6d 61 6e 64 20 69 6e 73 | 74 65 61 64 2e 20 20 53 |mand ins|tead. S|
|000013e0| 69 6e 63 65 20 74 68 65 | 20 5c 76 61 72 7b 63 6f |ince the| \var{co|
|000013f0| 6d 6d 61 6e 64 7d 20 61 | 72 67 75 6d 65 6e 74 20 |mmand} a|rgument |
|00001400| 6d 75 73 74 20 62 65 0d | 61 6e 20 69 64 65 6e 74 |must be.|an ident|
|00001410| 69 66 69 65 72 2c 20 60 | 60 5c 63 6f 64 65 7b 68 |ifier, `|`\code{h|
|00001420| 65 6c 70 20 65 78 65 63 | 7d 27 27 20 6d 75 73 74 |elp exec|}'' must|
|00001430| 20 62 65 20 65 6e 74 65 | 72 65 64 20 74 6f 20 67 | be ente|red to g|
|00001440| 65 74 20 68 65 6c 70 20 | 6f 6e 20 74 68 65 0d 60 |et help |on the.`|
|00001450| 60 5c 63 6f 64 65 7b 21 | 7d 27 27 20 63 6f 6d 6d |`\code{!|}'' comm|
|00001460| 61 6e 64 2e 0d 0d 5c 69 | 74 65 6d 5b 77 28 68 65 |and...\i|tem[w(he|
|00001470| 72 65 29 5d 0d 0d 50 72 | 69 6e 74 20 61 20 73 74 |re)]..Pr|int a st|
|00001480| 61 63 6b 20 74 72 61 63 | 65 2c 20 77 69 74 68 20 |ack trac|e, with |
|00001490| 74 68 65 20 6d 6f 73 74 | 20 72 65 63 65 6e 74 20 |the most| recent |
|000014a0| 66 72 61 6d 65 20 61 74 | 20 74 68 65 20 62 6f 74 |frame at| the bot|
|000014b0| 74 6f 6d 2e 0d 41 6e 20 | 61 72 72 6f 77 20 69 6e |tom..An |arrow in|
|000014c0| 64 69 63 61 74 65 73 20 | 74 68 65 20 63 75 72 72 |dicates |the curr|
|000014d0| 65 6e 74 20 66 72 61 6d | 65 2c 20 77 68 69 63 68 |ent fram|e, which|
|000014e0| 20 64 65 74 65 72 6d 69 | 6e 65 73 20 74 68 65 0d | determi|nes the.|
|000014f0| 63 6f 6e 74 65 78 74 20 | 6f 66 20 6d 6f 73 74 20 |context |of most |
|00001500| 63 6f 6d 6d 61 6e 64 73 | 2e 0d 0d 5c 69 74 65 6d |commands|...\item|
|00001510| 5b 64 28 6f 77 6e 29 5d | 0d 0d 4d 6f 76 65 20 74 |[d(own)]|..Move t|
|00001520| 68 65 20 63 75 72 72 65 | 6e 74 20 66 72 61 6d 65 |he curre|nt frame|
|00001530| 20 6f 6e 65 20 6c 65 76 | 65 6c 20 64 6f 77 6e 20 | one lev|el down |
|00001540| 69 6e 20 74 68 65 20 73 | 74 61 63 6b 20 74 72 61 |in the s|tack tra|
|00001550| 63 65 0d 28 74 6f 20 61 | 6e 20 6f 6c 64 65 72 20 |ce.(to a|n older |
|00001560| 66 72 61 6d 65 29 2e 0d | 0d 5c 69 74 65 6d 5b 75 |frame)..|.\item[u|
|00001570| 28 70 29 5d 0d 0d 4d 6f | 76 65 20 74 68 65 20 63 |(p)]..Mo|ve the c|
|00001580| 75 72 72 65 6e 74 20 66 | 72 61 6d 65 20 6f 6e 65 |urrent f|rame one|
|00001590| 20 6c 65 76 65 6c 20 75 | 70 20 69 6e 20 74 68 65 | level u|p in the|
|000015a0| 20 73 74 61 63 6b 20 74 | 72 61 63 65 0d 28 74 6f | stack t|race.(to|
|000015b0| 20 61 20 6e 65 77 65 72 | 20 66 72 61 6d 65 29 2e | a newer| frame).|
|000015c0| 0d 0d 5c 69 74 65 6d 5b | 62 28 72 65 61 6b 29 20 |..\item[|b(reak) |
|000015d0| 5b 5c 76 61 72 7b 6c 69 | 6e 65 6e 6f 7d 5c 63 6f |[\var{li|neno}\co|
|000015e0| 64 65 7b 7c 7d 5c 76 61 | 72 7b 66 75 6e 63 74 69 |de{|}\va|r{functi|
|000015f0| 6f 6e 7d 5d 5d 0d 0d 57 | 69 74 68 20 61 20 5c 76 |on}]]..W|ith a \v|
|00001600| 61 72 7b 6c 69 6e 65 6e | 6f 7d 20 61 72 67 75 6d |ar{linen|o} argum|
|00001610| 65 6e 74 2c 20 73 65 74 | 20 61 20 62 72 65 61 6b |ent, set| a break|
|00001620| 20 74 68 65 72 65 20 69 | 6e 20 74 68 65 20 63 75 | there i|n the cu|
|00001630| 72 72 65 6e 74 0d 66 69 | 6c 65 2e 20 20 57 69 74 |rrent.fi|le. Wit|
|00001640| 68 20 61 20 5c 76 61 72 | 7b 66 75 6e 63 74 69 6f |h a \var|{functio|
|00001650| 6e 7d 20 61 72 67 75 6d | 65 6e 74 2c 20 73 65 74 |n} argum|ent, set|
|00001660| 20 61 20 62 72 65 61 6b | 20 61 74 20 74 68 65 20 | a break| at the |
|00001670| 65 6e 74 72 79 20 6f 66 | 0d 74 68 61 74 20 66 75 |entry of|.that fu|
|00001680| 6e 63 74 69 6f 6e 2e 20 | 20 57 69 74 68 6f 75 74 |nction. | Without|
|00001690| 20 61 72 67 75 6d 65 6e | 74 2c 20 6c 69 73 74 20 | argumen|t, list |
|000016a0| 61 6c 6c 20 62 72 65 61 | 6b 73 2e 0d 0d 5c 69 74 |all brea|ks...\it|
|000016b0| 65 6d 5b 63 6c 28 65 61 | 72 29 20 5b 5c 76 61 72 |em[cl(ea|r) [\var|
|000016c0| 7b 6c 69 6e 65 6e 6f 7d | 5d 5d 0d 0d 57 69 74 68 |{lineno}|]]..With|
|000016d0| 20 61 20 5c 76 61 72 7b | 6c 69 6e 65 6e 6f 7d 20 | a \var{|lineno} |
|000016e0| 61 72 67 75 6d 65 6e 74 | 2c 20 63 6c 65 61 72 20 |argument|, clear |
|000016f0| 74 68 61 74 20 62 72 65 | 61 6b 20 69 6e 20 74 68 |that bre|ak in th|
|00001700| 65 20 63 75 72 72 65 6e | 74 20 66 69 6c 65 2e 0d |e curren|t file..|
|00001710| 57 69 74 68 6f 75 74 20 | 61 72 67 75 6d 65 6e 74 |Without |argument|
|00001720| 2c 20 63 6c 65 61 72 20 | 61 6c 6c 20 62 72 65 61 |, clear |all brea|
|00001730| 6b 73 20 28 62 75 74 20 | 66 69 72 73 74 20 61 73 |ks (but |first as|
|00001740| 6b 20 63 6f 6e 66 69 72 | 6d 61 74 69 6f 6e 29 2e |k confir|mation).|
|00001750| 0d 0d 5c 69 74 65 6d 5b | 73 28 74 65 70 29 5d 0d |..\item[|s(tep)].|
|00001760| 0d 45 78 65 63 75 74 65 | 20 74 68 65 20 63 75 72 |.Execute| the cur|
|00001770| 72 65 6e 74 20 6c 69 6e | 65 2c 20 73 74 6f 70 20 |rent lin|e, stop |
|00001780| 61 74 20 74 68 65 20 66 | 69 72 73 74 20 70 6f 73 |at the f|irst pos|
|00001790| 73 69 62 6c 65 20 6f 63 | 63 61 73 69 6f 6e 0d 28 |sible oc|casion.(|
|000017a0| 65 69 74 68 65 72 20 69 | 6e 20 61 20 66 75 6e 63 |either i|n a func|
|000017b0| 74 69 6f 6e 20 74 68 61 | 74 20 69 73 20 63 61 6c |tion tha|t is cal|
|000017c0| 6c 65 64 20 6f 72 20 6f | 6e 20 74 68 65 20 6e 65 |led or o|n the ne|
|000017d0| 78 74 20 6c 69 6e 65 20 | 69 6e 20 74 68 65 0d 63 |xt line |in the.c|
|000017e0| 75 72 72 65 6e 74 20 66 | 75 6e 63 74 69 6f 6e 29 |urrent f|unction)|
|000017f0| 2e 0d 0d 5c 69 74 65 6d | 5b 6e 28 65 78 74 29 5d |...\item|[n(ext)]|
|00001800| 0d 0d 43 6f 6e 74 69 6e | 75 65 20 65 78 65 63 75 |..Contin|ue execu|
|00001810| 74 69 6f 6e 20 75 6e 74 | 69 6c 20 74 68 65 20 6e |tion unt|il the n|
|00001820| 65 78 74 20 6c 69 6e 65 | 20 69 6e 20 74 68 65 20 |ext line| in the |
|00001830| 63 75 72 72 65 6e 74 20 | 66 75 6e 63 74 69 6f 6e |current |function|
|00001840| 0d 69 73 20 72 65 61 63 | 68 65 64 20 6f 72 20 69 |.is reac|hed or i|
|00001850| 74 20 72 65 74 75 72 6e | 73 2e 20 20 28 54 68 65 |t return|s. (The|
|00001860| 20 64 69 66 66 65 72 65 | 6e 63 65 20 62 65 74 77 | differe|nce betw|
|00001870| 65 65 6e 20 5c 63 6f 64 | 65 7b 6e 65 78 74 7d 20 |een \cod|e{next} |
|00001880| 61 6e 64 0d 5c 63 6f 64 | 65 7b 73 74 65 70 7d 20 |and.\cod|e{step} |
|00001890| 69 73 20 74 68 61 74 20 | 5c 63 6f 64 65 7b 73 74 |is that |\code{st|
|000018a0| 65 70 7d 20 73 74 6f 70 | 73 20 69 6e 73 69 64 65 |ep} stop|s inside|
|000018b0| 20 61 20 63 61 6c 6c 65 | 64 20 66 75 6e 63 74 69 | a calle|d functi|
|000018c0| 6f 6e 2c 20 77 68 69 6c | 65 0d 5c 63 6f 64 65 7b |on, whil|e.\code{|
|000018d0| 6e 65 78 74 7d 20 65 78 | 65 63 75 74 65 73 20 63 |next} ex|ecutes c|
|000018e0| 61 6c 6c 65 64 20 66 75 | 6e 63 74 69 6f 6e 73 20 |alled fu|nctions |
|000018f0| 61 74 20 28 6e 65 61 72 | 6c 79 29 20 66 75 6c 6c |at (near|ly) full|
|00001900| 20 73 70 65 65 64 2c 20 | 6f 6e 6c 79 0d 73 74 6f | speed, |only.sto|
|00001910| 70 70 69 6e 67 20 61 74 | 20 74 68 65 20 6e 65 78 |pping at| the nex|
|00001920| 74 20 6c 69 6e 65 20 69 | 6e 20 74 68 65 20 63 75 |t line i|n the cu|
|00001930| 72 72 65 6e 74 20 66 75 | 6e 63 74 69 6f 6e 2e 29 |rrent fu|nction.)|
|00001940| 0d 0d 5c 69 74 65 6d 5b | 72 28 65 74 75 72 6e 29 |..\item[|r(eturn)|
|00001950| 5d 0d 0d 43 6f 6e 74 69 | 6e 75 65 20 65 78 65 63 |]..Conti|nue exec|
|00001960| 75 74 69 6f 6e 20 75 6e | 74 69 6c 20 74 68 65 20 |ution un|til the |
|00001970| 63 75 72 72 65 6e 74 20 | 66 75 6e 63 74 69 6f 6e |current |function|
|00001980| 20 72 65 74 75 72 6e 73 | 2e 0d 0d 5c 69 74 65 6d | returns|...\item|
|00001990| 5b 63 28 6f 6e 74 28 69 | 6e 75 65 29 29 5d 0d 0d |[c(ont(i|nue))]..|
|000019a0| 43 6f 6e 74 69 6e 75 65 | 20 65 78 65 63 75 74 69 |Continue| executi|
|000019b0| 6f 6e 2c 20 6f 6e 6c 79 | 20 73 74 6f 70 20 77 68 |on, only| stop wh|
|000019c0| 65 6e 20 61 20 62 72 65 | 61 6b 70 6f 69 6e 74 20 |en a bre|akpoint |
|000019d0| 69 73 20 65 6e 63 6f 75 | 6e 74 65 72 65 64 2e 0d |is encou|ntered..|
|000019e0| 0d 5c 69 74 65 6d 5b 6c | 28 69 73 74 29 20 5b 5c |.\item[l|(ist) [\|
|000019f0| 76 61 72 7b 66 69 72 73 | 74 7d 20 5b 2c 20 5c 76 |var{firs|t} [, \v|
|00001a00| 61 72 7b 6c 61 73 74 7d | 5d 5d 5d 0d 0d 4c 69 73 |ar{last}|]]]..Lis|
|00001a10| 74 20 73 6f 75 72 63 65 | 20 63 6f 64 65 20 66 6f |t source| code fo|
|00001a20| 72 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 66 69 |r the cu|rrent fi|
|00001a30| 6c 65 2e 20 20 57 69 74 | 68 6f 75 74 20 61 72 67 |le. Wit|hout arg|
|00001a40| 75 6d 65 6e 74 73 2c 20 | 6c 69 73 74 20 31 31 0d |uments, |list 11.|
|00001a50| 6c 69 6e 65 73 20 61 72 | 6f 75 6e 64 20 74 68 65 |lines ar|ound the|
|00001a60| 20 63 75 72 72 65 6e 74 | 20 6c 69 6e 65 20 6f 72 | current| line or|
|00001a70| 20 63 6f 6e 74 69 6e 75 | 65 20 74 68 65 20 70 72 | continu|e the pr|
|00001a80| 65 76 69 6f 75 73 20 6c | 69 73 74 69 6e 67 2e 20 |evious l|isting. |
|00001a90| 20 57 69 74 68 0d 6f 6e | 65 20 61 72 67 75 6d 65 | With.on|e argume|
|00001aa0| 6e 74 2c 20 6c 69 73 74 | 20 31 31 20 6c 69 6e 65 |nt, list| 11 line|
|00001ab0| 73 20 61 72 6f 75 6e 64 | 20 61 74 20 74 68 61 74 |s around| at that|
|00001ac0| 20 6c 69 6e 65 2e 20 20 | 57 69 74 68 20 74 77 6f | line. |With two|
|00001ad0| 20 61 72 67 75 6d 65 6e | 74 73 2c 0d 6c 69 73 74 | argumen|ts,.list|
|00001ae0| 20 74 68 65 20 67 69 76 | 65 6e 20 72 61 6e 67 65 | the giv|en range|
|00001af0| 3b 20 69 66 20 74 68 65 | 20 73 65 63 6f 6e 64 20 |; if the| second |
|00001b00| 61 72 67 75 6d 65 6e 74 | 20 69 73 20 6c 65 73 73 |argument| is less|
|00001b10| 20 74 68 61 6e 20 74 68 | 65 20 66 69 72 73 74 2c | than th|e first,|
|00001b20| 0d 69 74 20 69 73 20 69 | 6e 74 65 72 70 72 65 74 |.it is i|nterpret|
|00001b30| 65 64 20 61 73 20 61 20 | 63 6f 75 6e 74 2e 0d 0d |ed as a |count...|
|00001b40| 5c 69 74 65 6d 5b 61 28 | 72 67 73 29 5d 0d 0d 50 |\item[a(|rgs)]..P|
|00001b50| 72 69 6e 74 20 74 68 65 | 20 61 72 67 75 6d 65 6e |rint the| argumen|
|00001b60| 74 20 6c 69 73 74 20 6f | 66 20 74 68 65 20 63 75 |t list o|f the cu|
|00001b70| 72 72 65 6e 74 20 66 75 | 6e 63 74 69 6f 6e 2e 0d |rrent fu|nction..|
|00001b80| 0d 5c 69 74 65 6d 5b 70 | 20 5c 76 61 72 7b 65 78 |.\item[p| \var{ex|
|00001b90| 70 72 65 73 73 69 6f 6e | 7d 5d 0d 0d 45 76 61 6c |pression|}]..Eval|
|00001ba0| 75 61 74 65 20 74 68 65 | 20 5c 76 61 72 7b 65 78 |uate the| \var{ex|
|00001bb0| 70 72 65 73 73 69 6f 6e | 7d 20 69 6e 20 74 68 65 |pression|} in the|
|00001bc0| 20 63 75 72 72 65 6e 74 | 20 63 6f 6e 74 65 78 74 | current| context|
|00001bd0| 20 61 6e 64 20 70 72 69 | 6e 74 20 69 74 73 0d 76 | and pri|nt its.v|
|00001be0| 61 6c 75 65 2e 20 20 28 | 4e 6f 74 65 3a 20 5c 63 |alue. (|Note: \c|
|00001bf0| 6f 64 65 7b 70 72 69 6e | 74 7d 20 63 61 6e 20 61 |ode{prin|t} can a|
|00001c00| 6c 73 6f 20 62 65 20 75 | 73 65 64 2c 20 62 75 74 |lso be u|sed, but|
|00001c10| 20 69 73 20 6e 6f 74 20 | 61 20 64 65 62 75 67 67 | is not |a debugg|
|00001c20| 65 72 0d 63 6f 6d 6d 61 | 6e 64 20 2d 2d 2d 20 74 |er.comma|nd --- t|
|00001c30| 68 69 73 20 65 78 65 63 | 75 74 65 73 20 74 68 65 |his exec|utes the|
|00001c40| 20 50 79 74 68 6f 6e 20 | 5c 63 6f 64 65 7b 70 72 | Python |\code{pr|
|00001c50| 69 6e 74 7d 20 73 74 61 | 74 65 6d 65 6e 74 2e 29 |int} sta|tement.)|
|00001c60| 0d 0d 5c 69 74 65 6d 5b | 5b 21 5d 20 5c 76 61 72 |..\item[|[!] \var|
|00001c70| 7b 73 74 61 74 65 6d 65 | 6e 74 7d 5d 0d 0d 45 78 |{stateme|nt}]..Ex|
|00001c80| 65 63 75 74 65 20 74 68 | 65 20 28 6f 6e 65 2d 6c |ecute th|e (one-l|
|00001c90| 69 6e 65 29 20 5c 76 61 | 72 7b 73 74 61 74 65 6d |ine) \va|r{statem|
|00001ca0| 65 6e 74 7d 20 69 6e 20 | 74 68 65 20 63 6f 6e 74 |ent} in |the cont|
|00001cb0| 65 78 74 20 6f 66 0d 74 | 68 65 20 63 75 72 72 65 |ext of.t|he curre|
|00001cc0| 6e 74 20 73 74 61 63 6b | 20 66 72 61 6d 65 2e 0d |nt stack| frame..|
|00001cd0| 54 68 65 20 65 78 63 6c | 61 6d 61 74 69 6f 6e 20 |The excl|amation |
|00001ce0| 70 6f 69 6e 74 20 63 61 | 6e 20 62 65 20 6f 6d 69 |point ca|n be omi|
|00001cf0| 74 74 65 64 20 75 6e 6c | 65 73 73 20 74 68 65 20 |tted unl|ess the |
|00001d00| 66 69 72 73 74 20 77 6f | 72 64 0d 6f 66 20 74 68 |first wo|rd.of th|
|00001d10| 65 20 73 74 61 74 65 6d | 65 6e 74 20 72 65 73 65 |e statem|ent rese|
|00001d20| 6d 62 6c 65 73 20 61 20 | 64 65 62 75 67 67 65 72 |mbles a |debugger|
|00001d30| 20 63 6f 6d 6d 61 6e 64 | 2e 0d 54 6f 20 73 65 74 | command|..To set|
|00001d40| 20 61 20 67 6c 6f 62 61 | 6c 20 76 61 72 69 61 62 | a globa|l variab|
|00001d50| 6c 65 2c 20 79 6f 75 20 | 63 61 6e 20 70 72 65 66 |le, you |can pref|
|00001d60| 69 78 20 74 68 65 20 61 | 73 73 69 67 6e 6d 65 6e |ix the a|ssignmen|
|00001d70| 74 0d 63 6f 6d 6d 61 6e | 64 20 77 69 74 68 20 61 |t.comman|d with a|
|00001d80| 20 60 60 5c 63 6f 64 65 | 7b 67 6c 6f 62 61 6c 7d | ``\code|{global}|
|00001d90| 27 27 20 63 6f 6d 6d 61 | 6e 64 20 6f 6e 20 74 68 |'' comma|nd on th|
|00001da0| 65 20 73 61 6d 65 20 6c | 69 6e 65 2c 20 65 2e 67 |e same l|ine, e.g|
|00001db0| 2e 3a 0d 5c 62 65 67 69 | 6e 7b 76 65 72 62 61 74 |.:.\begi|n{verbat|
|00001dc0| 69 6d 7d 0d 28 50 64 62 | 29 20 67 6c 6f 62 61 6c |im}.(Pdb|) global|
|00001dd0| 20 6c 69 73 74 5f 6f 70 | 74 69 6f 6e 73 3b 20 6c | list_op|tions; l|
|00001de0| 69 73 74 5f 6f 70 74 69 | 6f 6e 73 20 3d 20 5b 27 |ist_opti|ons = ['|
|00001df0| 2d 6c 27 5d 0d 28 50 64 | 62 29 0d 5c 65 6e 64 7b |-l'].(Pd|b).\end{|
|00001e00| 76 65 72 62 61 74 69 6d | 7d 0d 0d 5c 69 74 65 6d |verbatim|}..\item|
|00001e10| 5b 71 28 75 69 74 29 5d | 0d 0d 51 75 69 74 20 66 |[q(uit)]|..Quit f|
|00001e20| 72 6f 6d 20 74 68 65 20 | 64 65 62 75 67 67 65 72 |rom the |debugger|
|00001e30| 2e 0d 54 68 65 20 70 72 | 6f 67 72 61 6d 20 62 65 |..The pr|ogram be|
|00001e40| 69 6e 67 20 65 78 65 63 | 75 74 65 64 20 69 73 20 |ing exec|uted is |
|00001e50| 61 62 6f 72 74 65 64 2e | 0d 0d 5c 65 6e 64 7b 64 |aborted.|..\end{d|
|00001e60| 65 73 63 72 69 70 74 69 | 6f 6e 7d 0d 0d 5c 73 65 |escripti|on}..\se|
|00001e70| 63 74 69 6f 6e 7b 48 6f | 77 20 49 74 20 57 6f 72 |ction{Ho|w It Wor|
|00001e80| 6b 73 7d 0d 0d 53 6f 6d | 65 20 63 68 61 6e 67 65 |ks}..Som|e change|
|00001e90| 73 20 77 65 72 65 20 6d | 61 64 65 20 74 6f 20 74 |s were m|ade to t|
|00001ea0| 68 65 20 69 6e 74 65 72 | 70 72 65 74 65 72 3a 0d |he inter|preter:.|
|00001eb0| 0d 5c 62 65 67 69 6e 7b | 69 74 65 6d 69 7a 65 7d |.\begin{|itemize}|
|00001ec0| 0d 5c 69 74 65 6d 20 73 | 79 73 2e 73 65 74 74 72 |.\item s|ys.settr|
|00001ed0| 61 63 65 28 66 75 6e 63 | 29 20 73 65 74 73 20 74 |ace(func|) sets t|
|00001ee0| 68 65 20 67 6c 6f 62 61 | 6c 20 74 72 61 63 65 20 |he globa|l trace |
|00001ef0| 66 75 6e 63 74 69 6f 6e | 0d 5c 69 74 65 6d 20 74 |function|.\item t|
|00001f00| 68 65 72 65 20 63 61 6e | 20 61 6c 73 6f 20 61 20 |here can| also a |
|00001f10| 6c 6f 63 61 6c 20 74 72 | 61 63 65 20 66 75 6e 63 |local tr|ace func|
|00001f20| 74 69 6f 6e 20 28 73 65 | 65 20 6c 61 74 65 72 29 |tion (se|e later)|
|00001f30| 0d 5c 65 6e 64 7b 69 74 | 65 6d 69 7a 65 7d 0d 0d |.\end{it|emize}..|
|00001f40| 54 72 61 63 65 20 66 75 | 6e 63 74 69 6f 6e 73 20 |Trace fu|nctions |
|00001f50| 68 61 76 65 20 74 68 72 | 65 65 20 61 72 67 75 6d |have thr|ee argum|
|00001f60| 65 6e 74 73 3a 20 28 5c | 76 61 72 7b 66 72 61 6d |ents: (\|var{fram|
|00001f70| 65 7d 2c 20 5c 76 61 72 | 7b 65 76 65 6e 74 7d 2c |e}, \var|{event},|
|00001f80| 20 5c 76 61 72 7b 61 72 | 67 7d 29 0d 0d 5c 62 65 | \var{ar|g})..\be|
|00001f90| 67 69 6e 7b 64 65 73 63 | 72 69 70 74 69 6f 6e 7d |gin{desc|ription}|
|00001fa0| 0d 0d 5c 69 74 65 6d 5b | 5c 76 61 72 7b 66 72 61 |..\item[|\var{fra|
|00001fb0| 6d 65 7d 5d 20 69 73 20 | 74 68 65 20 63 75 72 72 |me}] is |the curr|
|00001fc0| 65 6e 74 20 73 74 61 63 | 6b 20 66 72 61 6d 65 0d |ent stac|k frame.|
|00001fd0| 0d 5c 69 74 65 6d 5b 5c | 76 61 72 7b 65 76 65 6e |.\item[\|var{even|
|00001fe0| 74 7d 5d 20 69 73 20 61 | 20 73 74 72 69 6e 67 3a |t}] is a| string:|
|00001ff0| 20 5c 63 6f 64 65 7b 27 | 63 61 6c 6c 27 7d 2c 20 | \code{'|call'}, |
|00002000| 5c 63 6f 64 65 7b 27 6c | 69 6e 65 27 7d 2c 20 5c |\code{'l|ine'}, \|
|00002010| 63 6f 64 65 7b 27 72 65 | 74 75 72 6e 27 7d 0d 6f |code{'re|turn'}.o|
|00002020| 72 20 5c 63 6f 64 65 7b | 27 65 78 63 65 70 74 69 |r \code{|'excepti|
|00002030| 6f 6e 27 7d 0d 0d 5c 69 | 74 65 6d 5b 5c 76 61 72 |on'}..\i|tem[\var|
|00002040| 7b 61 72 67 7d 5d 20 69 | 73 20 64 65 70 65 6e 64 |{arg}] i|s depend|
|00002050| 65 6e 74 20 6f 6e 20 74 | 68 65 20 65 76 65 6e 74 |ent on t|he event|
|00002060| 20 74 79 70 65 0d 0d 5c | 65 6e 64 7b 64 65 73 63 | type..\|end{desc|
|00002070| 72 69 70 74 69 6f 6e 7d | 0d 0d 41 20 74 72 61 63 |ription}|..A trac|
|00002080| 65 20 66 75 6e 63 74 69 | 6f 6e 20 73 68 6f 75 6c |e functi|on shoul|
|00002090| 64 20 72 65 74 75 72 6e | 20 61 20 6e 65 77 20 74 |d return| a new t|
|000020a0| 72 61 63 65 20 66 75 6e | 63 74 69 6f 6e 20 6f 72 |race fun|ction or|
|000020b0| 20 4e 6f 6e 65 2e 0d 43 | 6c 61 73 73 20 6d 65 74 | None..C|lass met|
|000020c0| 68 6f 64 73 20 61 72 65 | 20 61 63 63 65 70 74 65 |hods are| accepte|
|000020d0| 64 20 28 61 6e 64 20 6d | 6f 73 74 20 75 73 65 66 |d (and m|ost usef|
|000020e0| 75 6c 21 29 20 61 73 20 | 74 72 61 63 65 20 6d 65 |ul!) as |trace me|
|000020f0| 74 68 6f 64 73 2e 0d 0d | 54 68 65 20 65 76 65 6e |thods...|The even|
|00002100| 74 73 20 68 61 76 65 20 | 74 68 65 20 66 6f 6c 6c |ts have |the foll|
|00002110| 6f 77 69 6e 67 20 6d 65 | 61 6e 69 6e 67 3a 0d 0d |owing me|aning:..|
|00002120| 5c 62 65 67 69 6e 7b 64 | 65 73 63 72 69 70 74 69 |\begin{d|escripti|
|00002130| 6f 6e 7d 0d 0d 5c 69 74 | 65 6d 5b 5c 63 6f 64 65 |on}..\it|em[\code|
|00002140| 7b 27 63 61 6c 6c 27 7d | 5d 0d 41 20 66 75 6e 63 |{'call'}|].A func|
|00002150| 74 69 6f 6e 20 69 73 20 | 63 61 6c 6c 65 64 20 28 |tion is |called (|
|00002160| 6f 72 20 73 6f 6d 65 20 | 6f 74 68 65 72 20 63 6f |or some |other co|
|00002170| 64 65 20 62 6c 6f 63 6b | 20 65 6e 74 65 72 65 64 |de block| entered|
|00002180| 29 2e 20 20 54 68 65 20 | 67 6c 6f 62 61 6c 0d 74 |). The |global.t|
|00002190| 72 61 63 65 20 66 75 6e | 63 74 69 6f 6e 20 69 73 |race fun|ction is|
|000021a0| 20 63 61 6c 6c 65 64 3b | 20 61 72 67 20 69 73 20 | called;| arg is |
|000021b0| 74 68 65 20 61 72 67 75 | 6d 65 6e 74 20 6c 69 73 |the argu|ment lis|
|000021c0| 74 20 74 6f 20 74 68 65 | 20 66 75 6e 63 74 69 6f |t to the| functio|
|000021d0| 6e 3b 0d 74 68 65 20 72 | 65 74 75 72 6e 20 76 61 |n;.the r|eturn va|
|000021e0| 6c 75 65 20 73 70 65 63 | 69 66 69 65 73 20 74 68 |lue spec|ifies th|
|000021f0| 65 20 6c 6f 63 61 6c 20 | 74 72 61 63 65 20 66 75 |e local |trace fu|
|00002200| 6e 63 74 69 6f 6e 2e 0d | 0d 5c 69 74 65 6d 5b 5c |nction..|.\item[\|
|00002210| 63 6f 64 65 7b 27 6c 69 | 6e 65 27 7d 5d 0d 54 68 |code{'li|ne'}].Th|
|00002220| 65 20 69 6e 74 65 72 70 | 72 65 74 65 72 20 69 73 |e interp|reter is|
|00002230| 20 61 62 6f 75 74 20 74 | 6f 20 65 78 65 63 75 74 | about t|o execut|
|00002240| 65 20 61 20 6e 65 77 20 | 6c 69 6e 65 20 6f 66 20 |e a new |line of |
|00002250| 63 6f 64 65 20 28 73 6f | 6d 65 74 69 6d 65 73 0d |code (so|metimes.|
|00002260| 6d 75 6c 74 69 70 6c 65 | 20 6c 69 6e 65 20 65 76 |multiple| line ev|
|00002270| 65 6e 74 73 20 6f 6e 20 | 6f 6e 65 20 6c 69 6e 65 |ents on |one line|
|00002280| 20 65 78 69 73 74 29 2e | 20 20 54 68 65 20 6c 6f | exist).| The lo|
|00002290| 63 61 6c 20 74 72 61 63 | 65 20 66 75 6e 63 74 69 |cal trac|e functi|
|000022a0| 6f 6e 20 69 73 0d 63 61 | 6c 6c 65 64 3b 20 61 72 |on is.ca|lled; ar|
|000022b0| 67 20 69 6e 20 4e 6f 6e | 65 3b 20 74 68 65 20 72 |g in Non|e; the r|
|000022c0| 65 74 75 72 6e 20 76 61 | 6c 75 65 20 73 70 65 63 |eturn va|lue spec|
|000022d0| 69 66 69 65 73 20 74 68 | 65 20 6e 65 77 20 6c 6f |ifies th|e new lo|
|000022e0| 63 61 6c 20 74 72 61 63 | 65 0d 66 75 6e 63 74 69 |cal trac|e.functi|
|000022f0| 6f 6e 2e 0d 0d 5c 69 74 | 65 6d 5b 5c 63 6f 64 65 |on...\it|em[\code|
|00002300| 7b 27 72 65 74 75 72 6e | 27 7d 5d 0d 41 20 66 75 |{'return|'}].A fu|
|00002310| 6e 63 74 69 6f 6e 20 28 | 6f 72 20 6f 74 68 65 72 |nction (|or other|
|00002320| 20 63 6f 64 65 20 62 6c | 6f 63 6b 29 20 69 73 20 | code bl|ock) is |
|00002330| 61 62 6f 75 74 20 74 6f | 20 72 65 74 75 72 6e 2e |about to| return.|
|00002340| 20 20 54 68 65 20 6c 6f | 63 61 6c 20 74 72 61 63 | The lo|cal trac|
|00002350| 65 0d 66 75 6e 63 74 69 | 6f 6e 20 69 73 20 63 61 |e.functi|on is ca|
|00002360| 6c 6c 65 64 3b 20 61 72 | 67 20 69 73 20 74 68 65 |lled; ar|g is the|
|00002370| 20 76 61 6c 75 65 20 74 | 68 61 74 20 77 69 6c 6c | value t|hat will|
|00002380| 20 62 65 20 72 65 74 75 | 72 6e 65 64 2e 20 20 54 | be retu|rned. T|
|00002390| 68 65 20 74 72 61 63 65 | 0d 66 75 6e 63 74 69 6f |he trace|.functio|
|000023a0| 6e 27 73 20 72 65 74 75 | 72 6e 20 76 61 6c 75 65 |n's retu|rn value|
|000023b0| 20 69 73 20 69 67 6e 6f | 72 65 64 2e 0d 0d 5c 69 | is igno|red...\i|
|000023c0| 74 65 6d 5b 5c 63 6f 64 | 65 7b 27 65 78 63 65 70 |tem[\cod|e{'excep|
|000023d0| 74 69 6f 6e 27 7d 5d 0d | 41 6e 20 65 78 63 65 70 |tion'}].|An excep|
|000023e0| 74 69 6f 6e 20 68 61 73 | 20 6f 63 63 75 72 72 65 |tion has| occurre|
|000023f0| 64 2e 20 20 54 68 65 20 | 6c 6f 63 61 6c 20 74 72 |d. The |local tr|
|00002400| 61 63 65 20 66 75 6e 63 | 74 69 6f 6e 20 69 73 20 |ace func|tion is |
|00002410| 63 61 6c 6c 65 64 3b 20 | 61 72 67 20 69 73 0d 61 |called; |arg is.a|
|00002420| 20 74 72 69 70 6c 65 20 | 28 65 78 63 65 70 74 69 | triple |(excepti|
|00002430| 6f 6e 2c 20 76 61 6c 75 | 65 2c 20 74 72 61 63 65 |on, valu|e, trace|
|00002440| 62 61 63 6b 29 3b 20 74 | 68 65 20 72 65 74 75 72 |back); t|he retur|
|00002450| 6e 20 76 61 6c 75 65 20 | 73 70 65 63 69 66 69 65 |n value |specifie|
|00002460| 73 20 74 68 65 0d 6e 65 | 77 20 6c 6f 63 61 6c 20 |s the.ne|w local |
|00002470| 74 72 61 63 65 20 66 75 | 6e 63 74 69 6f 6e 0d 0d |trace fu|nction..|
|00002480| 5c 65 6e 64 7b 64 65 73 | 63 72 69 70 74 69 6f 6e |\end{des|cription|
|00002490| 7d 0d 0d 4e 6f 74 65 20 | 74 68 61 74 20 61 73 20 |}..Note |that as |
|000024a0| 61 6e 20 65 78 63 65 70 | 74 69 6f 6e 20 69 73 20 |an excep|tion is |
|000024b0| 70 72 6f 70 61 67 61 74 | 65 64 20 64 6f 77 6e 20 |propagat|ed down |
|000024c0| 74 68 65 20 63 68 61 69 | 6e 20 6f 66 20 63 61 6c |the chai|n of cal|
|000024d0| 6c 65 72 73 2c 20 61 6e | 0d 5c 63 6f 64 65 7b 27 |lers, an|.\code{'|
|000024e0| 65 78 63 65 70 74 69 6f | 6e 27 7d 20 65 76 65 6e |exceptio|n'} even|
|000024f0| 74 20 69 73 20 67 65 6e | 65 72 61 74 65 64 20 61 |t is gen|erated a|
|00002500| 74 20 65 61 63 68 20 6c | 65 76 65 6c 2e 0d 0d 53 |t each l|evel...S|
|00002510| 74 61 63 6b 20 66 72 61 | 6d 65 20 6f 62 6a 65 63 |tack fra|me objec|
|00002520| 74 73 20 68 61 76 65 20 | 74 68 65 20 66 6f 6c 6c |ts have |the foll|
|00002530| 6f 77 69 6e 67 20 72 65 | 61 64 2d 6f 6e 6c 79 20 |owing re|ad-only |
|00002540| 61 74 74 72 69 62 75 74 | 65 73 3a 0d 0d 5c 62 65 |attribut|es:..\be|
|00002550| 67 69 6e 7b 64 65 73 63 | 72 69 70 74 69 6f 6e 7d |gin{desc|ription}|
|00002560| 0d 5c 69 74 65 6d 5b 66 | 5f 63 6f 64 65 5d 20 20 |.\item[f|_code] |
|00002570| 20 20 20 20 74 68 65 20 | 63 6f 64 65 20 6f 62 6a | the |code obj|
|00002580| 65 63 74 20 62 65 69 6e | 67 20 65 78 65 63 75 74 |ect bein|g execut|
|00002590| 65 64 0d 5c 69 74 65 6d | 5b 66 5f 6c 69 6e 65 6e |ed.\item|[f_linen|
|000025a0| 6f 5d 20 20 20 20 74 68 | 65 20 63 75 72 72 65 6e |o] th|e curren|
|000025b0| 74 20 6c 69 6e 65 20 6e | 75 6d 62 65 72 20 28 5c |t line n|umber (\|
|000025c0| 63 6f 64 65 7b 2d 31 7d | 20 66 6f 72 20 5c 63 6f |code{-1}| for \co|
|000025d0| 64 65 7b 27 63 61 6c 6c | 27 7d 20 65 76 65 6e 74 |de{'call|'} event|
|000025e0| 73 29 0d 5c 69 74 65 6d | 5b 66 5f 62 61 63 6b 5d |s).\item|[f_back]|
|000025f0| 20 20 20 20 20 20 74 68 | 65 20 73 74 61 63 6b 20 | th|e stack |
|00002600| 66 72 61 6d 65 20 6f 66 | 20 74 68 65 20 63 61 6c |frame of| the cal|
|00002610| 6c 65 72 2c 20 6f 72 20 | 4e 6f 6e 65 0d 5c 69 74 |ler, or |None.\it|
|00002620| 65 6d 5b 66 5f 6c 6f 63 | 61 6c 73 5d 20 20 20 20 |em[f_loc|als] |
|00002630| 64 69 63 74 69 6f 6e 61 | 72 79 20 63 6f 6e 74 61 |dictiona|ry conta|
|00002640| 69 6e 69 6e 67 20 6c 6f | 63 61 6c 20 6e 61 6d 65 |ining lo|cal name|
|00002650| 20 62 69 6e 64 69 6e 67 | 73 0d 5c 69 74 65 6d 5b | binding|s.\item[|
|00002660| 66 5f 67 6c 6f 62 61 6c | 73 5d 20 20 20 64 69 63 |f_global|s] dic|
|00002670| 74 69 6f 6e 61 72 79 20 | 63 6f 6e 74 61 69 6e 69 |tionary |containi|
|00002680| 6e 67 20 67 6c 6f 62 61 | 6c 20 6e 61 6d 65 20 62 |ng globa|l name b|
|00002690| 69 6e 64 69 6e 67 73 0d | 5c 65 6e 64 7b 64 65 73 |indings.|\end{des|
|000026a0| 63 72 69 70 74 69 6f 6e | 7d 0d 0d 43 6f 64 65 20 |cription|}..Code |
|000026b0| 6f 62 6a 65 63 74 73 20 | 68 61 76 65 20 74 68 65 |objects |have the|
|000026c0| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 72 65 61 64 2d | followi|ng read-|
|000026d0| 6f 6e 6c 79 20 61 74 74 | 72 69 62 75 74 65 73 3a |only att|ributes:|
|000026e0| 0d 0d 5c 62 65 67 69 6e | 7b 64 65 73 63 72 69 70 |..\begin|{descrip|
|000026f0| 74 69 6f 6e 7d 0d 5c 69 | 74 65 6d 5b 63 6f 5f 63 |tion}.\i|tem[co_c|
|00002700| 6f 64 65 5d 20 20 20 20 | 20 74 68 65 20 63 6f 64 |ode] | the cod|
|00002710| 65 20 73 74 72 69 6e 67 | 0d 5c 69 74 65 6d 5b 63 |e string|.\item[c|
|00002720| 6f 5f 6e 61 6d 65 73 5d | 20 20 20 20 74 68 65 20 |o_names]| the |
|00002730| 6c 69 73 74 20 6f 66 20 | 6e 61 6d 65 73 20 75 73 |list of |names us|
|00002740| 65 64 20 62 79 20 74 68 | 65 20 63 6f 64 65 0d 5c |ed by th|e code.\|
|00002750| 69 74 65 6d 5b 63 6f 5f | 63 6f 6e 73 74 73 5d 20 |item[co_|consts] |
|00002760| 20 20 74 68 65 20 6c 69 | 73 74 20 6f 66 20 28 6c | the li|st of (l|
|00002770| 69 74 65 72 61 6c 29 20 | 63 6f 6e 73 74 61 6e 74 |iteral) |constant|
|00002780| 73 20 75 73 65 64 20 62 | 79 20 74 68 65 20 63 6f |s used b|y the co|
|00002790| 64 65 0d 5c 69 74 65 6d | 5b 63 6f 5f 66 69 6c 65 |de.\item|[co_file|
|000027a0| 6e 61 6d 65 5d 20 74 68 | 65 20 66 69 6c 65 6e 61 |name] th|e filena|
|000027b0| 6d 65 20 66 72 6f 6d 20 | 77 68 69 63 68 20 74 68 |me from |which th|
|000027c0| 65 20 63 6f 64 65 20 77 | 61 73 20 63 6f 6d 70 69 |e code w|as compi|
|000027d0| 6c 65 64 0d 5c 65 6e 64 | 7b 64 65 73 63 72 69 70 |led.\end|{descrip|
|000027e0| 74 69 6f 6e 7d 0d | |tion}. | |
+--------+-------------------------+-------------------------+--------+--------+