]> git.phdru.name Git - dotfiles.git/commitdiff
init.py: use pager to view a (possibly quite long) traceback
authorOleg Broytman <phd@phdru.name>
Tue, 19 Apr 2016 10:30:07 +0000 (13:30 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 19 Apr 2016 10:30:07 +0000 (13:30 +0300)
lib/python/init.py

index 15bcb32596c22a22b8768f215dc208a7117db1bd..69b9ac162c3411e0feb341c9312ca3f8dba28dcd 100644 (file)
@@ -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