File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ def set_trace():
41
41
debugger = BPdb ()
42
42
debugger .set_trace (sys ._getframe ().f_back )
43
43
44
+
44
45
# Adopted verbatim from pdb for completeness:
45
46
46
47
def post_mortem (t = None ):
@@ -57,9 +58,11 @@ def post_mortem(t=None):
57
58
p .reset ()
58
59
p .interaction (None , t )
59
60
61
+
60
62
def pm ():
61
63
post_mortem (getattr (sys , "last_traceback" , None ))
62
64
65
+
63
66
def main ():
64
67
parser = OptionParser (
65
68
usage = 'Usage: %prog [options] [file [args]]' )
@@ -73,7 +76,7 @@ def main():
73
76
'See AUTHORS for detail.' )
74
77
return 0
75
78
76
- # The following code is baed on Python's pdb.py.
79
+ # The following code is based on Python's pdb.py.
77
80
mainpyfile = args [1 ]
78
81
if not os .path .exists (mainpyfile ):
79
82
print ('Error:' , mainpyfile , 'does not exist' )
Original file line number Diff line number Diff line change 25
25
import pdb
26
26
import bpython
27
27
28
+
28
29
class BPdb (pdb .Pdb ):
29
30
""" PDB with BPython support. """
30
31
@@ -39,20 +40,17 @@ def postloop(self):
39
40
self .intro = None
40
41
pdb .Pdb .postloop (self )
41
42
42
- ### cmd.Cmd commands
43
-
43
+ # cmd.Cmd commands
44
44
45
45
def do_Bpython (self , arg ):
46
46
bpython .embed (self .curframe .f_locals , ['-i' ])
47
47
48
-
49
48
def help_Bpython (self ):
50
49
print ("B(python)" )
51
50
print ("" )
52
51
print ("Invoke the bpython interpreter for this stack frame. To exit "
53
52
"bpython and return to a standard pdb press Ctrl-d" )
54
53
55
-
56
- ### shortcuts
54
+ # shortcuts
57
55
do_B = do_Bpython
58
56
help_B = help_Bpython
You can’t perform that action at this time.
0 commit comments