Created
July 28, 2015 03:16
-
-
Save xcodebuild/3fef2c1e6eb109a91977 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment