From: Oleg Broytman Date: Tue, 19 Apr 2016 10:30:07 +0000 (+0300) Subject: init.py: use pager to view a (possibly quite long) traceback X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=35ae23197e163d6d718842875359a2281e85237e;p=dotfiles.git init.py: use pager to view a (possibly quite long) traceback --- 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