| LEFT | RIGHT |
| 1 """Extract, format and print information about Python stack traces.""" | 1 """Extract, format and print information about Python stack traces.""" |
| 2 | 2 |
| 3 import linecache | 3 import linecache |
| 4 import sys | 4 import sys |
| 5 | 5 |
| 6 __all__ = ['extract_stack', 'extract_tb', 'format_exception', | 6 __all__ = ['extract_stack', 'extract_tb', 'format_exception', |
| 7 'format_exception_only', 'format_list', 'format_stack', | 7 'format_exception_only', 'format_list', 'format_stack', |
| 8 'format_tb', 'print_exc', 'format_exc', 'print_exception', | 8 'format_tb', 'print_exc', 'format_exc', 'print_exception', |
| 9 'print_last', 'print_stack', 'print_tb'] | 9 'print_last', 'print_stack', 'print_tb'] |
| 10 | 10 |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 name = co.co_name | 331 name = co.co_name |
| 332 linecache.checkcache(filename) | 332 linecache.checkcache(filename) |
| 333 line = linecache.getline(filename, lineno, f.f_globals) | 333 line = linecache.getline(filename, lineno, f.f_globals) |
| 334 if line: line = line.strip() | 334 if line: line = line.strip() |
| 335 else: line = None | 335 else: line = None |
| 336 list.append((filename, lineno, name, line)) | 336 list.append((filename, lineno, name, line)) |
| 337 f = f.f_back | 337 f = f.f_back |
| 338 n = n+1 | 338 n = n+1 |
| 339 list.reverse() | 339 list.reverse() |
| 340 return list | 340 return list |
| LEFT | RIGHT |