From 35ae23197e163d6d718842875359a2281e85237e Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 19 Apr 2016 13:30:07 +0300 Subject: [PATCH] init.py: use pager to view a (possibly quite long) traceback --- lib/python/init.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/python/init.py b/lib/python/init.py index 15bcb32..69b9ac1 100644 --- a/lib/python/init.py +++ b/lib/python/init.py @@ -158,7 +158,9 @@ def init(): from traceback import print_exception def excepthook(etype, evalue, etraceback): - print_exception(etype, evalue, etraceback) + pprint_pager = PPrintPager() + print_exception(etype, evalue, etraceback, file=pprint_pager.stdin) + pprint_pager.close() sys.excepthook = excepthook -- 2.39.5