Spaces:
Build error
Build error
File size: 366 Bytes
98f685a |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import sys
class ExceptionHook:
instance = None
def __call__(self, *args, **kwargs):
if self.instance is None:
from IPython.core import ultratb
self.instance = ultratb.FormattedTB(mode='Plain',
color_scheme='Linux', call_pdb=1)
return self.instance(*args, **kwargs)
sys.excepthook = ExceptionHook()
|