Clear the output of the current cell receiving output. Parameters ---------- wait : bool [default: false] Wait to clear the output until new output is available to replace it.
(wait=False)
| 1453 | |
| 1454 | |
| 1455 | def clear_output(wait=False): |
| 1456 | """Clear the output of the current cell receiving output. |
| 1457 | |
| 1458 | Parameters |
| 1459 | ---------- |
| 1460 | wait : bool [default: false] |
| 1461 | Wait to clear the output until new output is available to replace it.""" |
| 1462 | from IPython.core.interactiveshell import InteractiveShell |
| 1463 | if InteractiveShell.initialized(): |
| 1464 | InteractiveShell.instance().display_pub.clear_output(wait) |
| 1465 | else: |
| 1466 | print('\033[2K\r', end='') |
| 1467 | sys.stdout.flush() |
| 1468 | print('\033[2K\r', end='') |
| 1469 | sys.stderr.flush() |
| 1470 | |
| 1471 | |
| 1472 | @skip_doctest |
nothing calls this directly
no test coverage detected