def handle_remote_error(proxy, view, row_offset=0): print proxy.error window = view.window() panel = window.get_output_panel('ipython_traceback') set_view_text(panel, proxy.error) window.run_command( 'show_panel', {'panel': 'output.ipython_traceback'}) window.focus_view(panel) tb = proxy.traceback if '<ipython-input' in tb[0][0]: line = tb[0][1] + row_offset select_line(view, line) redraw_view(view) if len(tb) > 1: detailed_tb = [] for filename, line, t in tb: if '<ipython-input' in filename: line += row_offset x = 'Line {0} of {1}'.format(line, filename) lines = t.splitlines() lines.insert(0, x) detailed_tb.append(lines) sublime.active_window().show_quick_panel(detailed_tb, sys)
def todo(): sel = sublime.active_window().active_view().sel() sel.clear() sel.add(sel0) redraw_view() sublime.set_timeout(execute, 1)