# libtmux.Window.select_pane

- **Module:** libtmux.Window
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/window.py#L503
- **Page:** https://libtmux.org/en/py/latest/reference/libtmux-window-select_pane/

```
libtmux.Window.select_pane(self, target_pane: str | int) -> Pane | None
```

Select pane and return selected :class:`Pane`.

``$ tmux select-pane``.

## Parameters

- `self`
- `target_pane` (str | int): 'target_pane', '-U' ,'-D', '-L', '-R', or '-l'.

## Returns

:class:`Pane`
