有没有办法让 jupyter 笔记本中的 python showtraceback 可滚动?

ano*_*omp 6 python scroll styling jupyter-notebook

或者如果有内置的滚动功能,要编辑滚动设置吗?

我尝试过这个,但没有成功——

def test_exception(self, etype, value, tb, tb_offset=None):
    try:
        announce = Announce(etype, value)
        if announce.print:
            announce.title()
            announce.tips()
            announce.resources()
            announce.feedback()
            announce.scroll(self, etype, value, tb, tb_offset)
        #self.showtraceback((etype, value, tb), tb_offset=tb_offset)
    except:
        self.showtraceback((etype, value, tb), tb_offset=tb_offset)
    def scroll(self, etype, value, tb, tb_offset=None):
        b=widgets.HTML(
        value=self.showtraceback((etype, value, tb), tb_offset=tb_offset),
        placeholder='Some HTML',
        description='Some HTML',
        disabled=True
        )
        a = HBox([b], layout=Layout(height='20px', overflow_y='10px'))
        display(a)
Run Code Online (Sandbox Code Playgroud)

小智 2

尝试在 Jupyter UI 中转到cell>>以启用单元格的滚动输出current outputstoggle scrolling