# libtmux.Pane.__exit__

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/pane.py#L111
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-pane-__exit__/

```
libtmux.Pane.__exit__(
    self,
    exc_type: type[BaseException] | None,
    exc_value: BaseException | None,
    exc_tb: types.TracebackType | None,
) -> None
```

Exit the context, killing the pane if it exists.

## Parameters

- `exc_type` (`type[BaseException] | None`): The type of the exception that was raised
- `exc_value` (`BaseException | None`): The instance of the exception that was raised
- `exc_tb` (`types.TracebackType | None`): The traceback of the exception that was raised
