I don't think it's currently possible. Do you want to file an issue on
ipython/ipython to request it?

On 13 July 2017 at 22:05, Sudarshan Raghunathan <[email protected]> wrote:

> I am writing a "post_execute" event handler that looks something like this:
> class MyEventHandler(object):
>     def __init__(self, ip):
>         self.shell = ip
>
>     def post_execute(self):
>         ec = self.shell.execution_count
>         print("post execute: \nIn = %s\nOut =
> %s"%(self.shell.user_ns["In"][ec], self.shell.user_ns["Out"].get(ec,
> None)))
>
> def load_ipython_extension(ip):
>     eh = MyEventHandler(ip)
>     ip.events.register("post_execute", eh.post_execute)
>
> It works as expected when a cell runs successfully. However, when a cell
> fails with an exception, I could not find any way to get to the stack-trace
> that was generated. Is this possible somehow?
>
> Thank you in advance!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/4937f1ad-2491-46e2-a9b7-aa2dcc2f2e54%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/4937f1ad-2491-46e2-a9b7-aa2dcc2f2e54%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAOvn4qgVis4s596njLHt7795k_2omBc9RMDtDUzfC7-uBM9HCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to