These are chat archives for ipython/ipython

17th
Aug 2015
Aaron Meurer
@asmeurer
Aug 17 2015 01:06
how do I tell if the previous cell raised an exception?
Aaron Meurer
@asmeurer
Aug 17 2015 01:24
(specifically in the terminal)
do I need to create a custom excepthook that saves it somehow?
Min RK
@minrk
Aug 17 2015 06:00
A custom excepthook would work. I don't think we save that by default.
Jason Grout
@jasongrout
Aug 17 2015 14:32
@akloster - I'm not finding a simple guide, but the basic idea is to 1) register a comm target in javascript, and 2) use the comm manager in python to open a comm to that comm target.
Someone should write up a simple notebook tutorial on it, though...
Aaron Meurer
@asmeurer
Aug 17 2015 17:19
can someone confirm that this is the correct way to create a custom exception handler that falls back to the original behavior?
    def exc_handler(self, etype, value, tb, tb_offset=None):
        print("Exception")
        return self.showtraceback()

    ipython.set_custom_exc((Exception,), exc_handler)
Min RK
@minrk
Aug 17 2015 17:31
I think that's right
Aaron Meurer
@asmeurer
Aug 17 2015 19:25
The problem with this is that if two things try to do this you will get double tracebacks.
A design like sys.excepthook where you can just save the original and call it avoids this
or a design like Python’s import stuff where you have a list of handlers and the default handlers are handled the same way as custom ones.
I guess you can only have one of these at a time?
Min RK
@minrk
Aug 17 2015 19:40
Yeah, there's only one custom except hook
Jason Grout
@jasongrout
Aug 17 2015 20:44
something seems to be weird with the github ipython repo
the git urls on the right side aren't showing up
and when I try going to the url with incognito, I get a 500 server error
Min RK
@minrk
Aug 17 2015 20:47
I assume it's a general GitHub issue https://status.github.com
Jason Grout
@jasongrout
Aug 17 2015 20:47
oh
Jason Grout
@jasongrout
Aug 17 2015 21:05
seems to work now. Thanks