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():
4141 debugger = BPdb ()
4242 debugger .set_trace (sys ._getframe ().f_back )
4343
44+
4445# Adopted verbatim from pdb for completeness:
4546
4647def post_mortem (t = None ):
@@ -57,9 +58,11 @@ def post_mortem(t=None):
5758 p .reset ()
5859 p .interaction (None , t )
5960
61+
6062def pm ():
6163 post_mortem (getattr (sys , "last_traceback" , None ))
6264
65+
6366def main ():
6467 parser = OptionParser (
6568 usage = 'Usage: %prog [options] [file [args]]' )
@@ -73,7 +76,7 @@ def main():
7376 'See AUTHORS for detail.' )
7477 return 0
7578
76- # The following code is baed on Python's pdb.py.
79+ # The following code is based on Python's pdb.py.
7780 mainpyfile = args [1 ]
7881 if not os .path .exists (mainpyfile ):
7982 print ('Error:' , mainpyfile , 'does not exist' )
Original file line number Diff line number Diff line change 2525import pdb
2626import bpython
2727
28+
2829class BPdb (pdb .Pdb ):
2930 """ PDB with BPython support. """
3031
@@ -39,20 +40,17 @@ def postloop(self):
3940 self .intro = None
4041 pdb .Pdb .postloop (self )
4142
42- ### cmd.Cmd commands
43-
43+ # cmd.Cmd commands
4444
4545 def do_Bpython (self , arg ):
4646 bpython .embed (self .curframe .f_locals , ['-i' ])
4747
48-
4948 def help_Bpython (self ):
5049 print ("B(python)" )
5150 print ("" )
5251 print ("Invoke the bpython interpreter for this stack frame. To exit "
5352 "bpython and return to a standard pdb press Ctrl-d" )
5453
55-
56- ### shortcuts
54+ # shortcuts
5755 do_B = do_Bpython
5856 help_B = help_Bpython
You can’t perform that action at this time.
0 commit comments