# libtmux.Window.select_pane

- **Module:** libtmux.Window
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/window.py#L503
- **Page:** https://libtmux.org/reference/py/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`
