File tree Expand file tree Collapse file tree 2 files changed +13
-16
lines changed
Expand file tree Collapse file tree 2 files changed +13
-16
lines changed Original file line number Diff line number Diff line change 2020# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121# THE SOFTWARE.
2222
23+ import sys
2324
2425import bpython
26+ from bpdb .debugger import BPdb
2527
2628
2729__version__ = bpython .__version__
3032def set_trace ():
3133 """ Just like pdb.set_trace(), a helper function that creates
3234 a debugger instance and sets the trace. """
33- import sys
34- from bpdb .debugger import BPdb
35- BPdb ().set_trace (sys ._getframe ().f_back )
36-
37-
38- go = set_trace
35+ debugger = BPdb ()
36+ debugger .set_trace (sys ._getframe ().f_back )
Original file line number Diff line number Diff line change 2626
2727class BPdb (pdb .Pdb ):
2828 """ PDB with BPython support. """
29-
29+
3030 def __init__ (self ):
3131 pdb .Pdb .__init__ (self )
3232 self .rcLines = []
@@ -36,18 +36,17 @@ def __init__(self):
3636 ### cmd.Cmd commands
3737
3838
39- def do_BPython (self , arg ):
39+ def do_Bpython (self , arg ):
4040 bpython .embed (self .curframe .f_locals , ['-i' ])
4141
4242
43- def help_BPython (self ):
44- print >> self . stdout , "B(Python)"
45- print >> self . stdout , """Invoke the BPython interpreter for this
46- stack frame. To exit BPython and return to BPdb type in CTRL+D
47- (CTRL+Z on Windows)."""
43+ def help_Bpython (self ):
44+ print "B(python)"
45+ print
46+ print ( "Invoke the bpython interpreter for this stack frame. To exit "
47+ "bpython and return to a standard pdb press Ctrl-d" )
4848
4949
5050 ### shortcuts
51-
52- do_B = do_BPython
53- help_B = help_BPython
51+ do_B = do_Bpython
52+ help_B = help_Bpython
You can’t perform that action at this time.
0 commit comments