add ability to silence the banner
This commit is contained in:
parent
2d0978b0f1
commit
e359b7dbb4
@ -1,2 +1,9 @@
|
||||
import argparse
|
||||
|
||||
from better_exceptions import interact
|
||||
interact()
|
||||
|
||||
parser = argparse.ArgumentParser(description='A Python REPL with better exceptions enabled', prog='python -m better_exceptions')
|
||||
parser.add_argument('-q', '--quiet', help="don't show a banner", action='store_true')
|
||||
args = parser.parse_args()
|
||||
|
||||
interact(args.quiet)
|
||||
|
@ -43,7 +43,8 @@ def get_repl():
|
||||
return repl
|
||||
|
||||
|
||||
def interact():
|
||||
def interact(quiet=False):
|
||||
global repl
|
||||
repl = BetterExceptionsConsole()
|
||||
repl.interact()
|
||||
banner = '' if quiet else None
|
||||
repl.interact(banner)
|
||||
|
Loading…
Reference in New Issue
Block a user