Skip to content

Commit d274eba

Browse files
kdartthomasballinger
authored andcommitted
Remove pretty print feature. make bpdb the default.
1 parent b37d832 commit d274eba

File tree

4 files changed

+2
-11
lines changed

4 files changed

+2
-11
lines changed

bpython/args.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ def parse(args, extras=None, ignore_stdin=False):
7474
help=_("Don't flush the output to stdout."))
7575
parser.add_option('--version', '-V', action='store_true',
7676
help=_('Print version and exit.'))
77-
parser.add_option('--pretty', '-p', action='store_true',
78-
help=_('Pretty print output.'))
7977
parser.add_option('--debugger', '-D', action='store_true',
8078
help=_('Enter a debugger on exceptions.'))
8179

bpython/cli.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
import re
5050
import time
5151
import functools
52-
from pprint import pprint
5352

5453
import struct
5554
if platform.system() != 'Windows':
@@ -1954,10 +1953,6 @@ def main_curses(scr, args, config, interactive=True, locals_=None,
19541953
return (exit_value, clirepl.getstdout())
19551954

19561955

1957-
def prettydisplayhook(obj):
1958-
pprint(obj)
1959-
1960-
19611956
def debugger_hook(exc, value, tb):
19621957

19631958
if exc in (SyntaxError, IndentationError, KeyboardInterrupt):
@@ -2004,8 +1999,6 @@ def main(args=None, locals_=None, banner=None):
20041999

20052000
if options.debugger:
20062001
sys.excepthook = debugger_hook
2007-
if options.pretty:
2008-
sys.displayhook = prettydisplayhook
20092002

20102003
try:
20112004
(exit_value, output) = curses_wrapper(

bpython/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ def loadini(struct, configfile):
9999
'clear_word': 'C-w',
100100
'copy_clipboard': 'F10',
101101
'cut_to_buffer': 'C-k',
102+
'debug': 'F12',
102103
'delete': 'C-d',
103104
'down_one_line': 'C-n',
104105
'edit_config': 'F3',
@@ -123,7 +124,6 @@ def loadini(struct, configfile):
123124
'undo': 'C-r',
124125
'up_one_line': 'C-p',
125126
'yank_from_buffer': 'C-y',
126-
'debug': 'F12',
127127
},
128128
'cli': {
129129
'suggestion_width': 0.8,

bpython/debugger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
def _get_debugger():
2323
global post_mortem
24-
modname = os.environ.get("PYTHON_DEBUGGER", "pdb")
24+
modname = os.environ.get("PYTHON_DEBUGGER", "bpdb")
2525
__import__(modname)
2626
mod = sys.modules[modname]
2727
pm = getattr(mod, "post_mortem")

0 commit comments

Comments
 (0)