Did you try with %xmode
?
In [2]: %xmode?
Type: Magic function
Definition: %xmode(self, parameter_s='')
Docstring:
Switch modes for the exception handlers.
Valid modes: Plain, Context and Verbose.
If called without arguments, acts as a toggle.
if you look carefully the 2 following example are different, but difference is more visible with long tracebacks :
In [8]: raise ValueError('Foo')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-8-05e81bf5c607> in <module>()
----> 1 raise ValueError('Foo')
global ValueError = undefined
ValueError: Foo
Plain mode
In [9]: xmode
Exception reporting mode: Plain
In [10]: raise ValueError('Foo')
Traceback (most recent call last):
File "<ipython-input-10-05e81bf5c607>", line 1, in <module>
raise ValueError('Foo')
ValueError: Foo