(fname: str, idx: int)
| 1767 | """Display the last Python exception.""" |
| 1768 | |
| 1769 | def _show_code_line(fname: str, idx: int) -> str: |
| 1770 | fname = os.path.expanduser(os.path.expandvars(fname)) |
| 1771 | with open(fname, "r") as f: |
| 1772 | _data = f.readlines() |
| 1773 | return _data[idx - 1] if 0 < idx < len(_data) else "" |
| 1774 | |
| 1775 | gef_print("") |
| 1776 | exc_type, exc_value, exc_traceback = sys.exc_info() |
no outgoing calls
no test coverage detected