# libtmux.Pane.select

- **Module:** libtmux.Pane
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/pane.py#L1089
- **Page:** https://libtmux.org/reference/py/libtmux-pane-select/

```
libtmux.Pane.select(self, direction: ResizeAdjustmentDirection | None = None, last: bool | None = None, keep_zoom: bool | None = None, mark: bool | None = None, clear_mark: bool | None = None, disable_input: bool | None = None, enable_input: bool | None = None) -> Pane
```

Select pane.

## Parameters

- `self`
- `direction` (ResizeAdjustmentDirection | None) — Select the pane in the given direction (``-U``, ``-D``, ``-L``,
``-R``).
- `last` (bool | None) — Select the last (previously selected) pane (``-l`` flag).
- `keep_zoom` (bool | None) — Keep the window zoomed if it was zoomed (``-Z`` flag).
- `mark` (bool | None) — Set the marked pane (``-m`` flag).
- `clear_mark` (bool | None) — Clear the marked pane (``-M`` flag).
- `disable_input` (bool | None) — Disable input to the pane (``-d`` flag).
- `enable_input` (bool | None) — Enable input to the pane (``-e`` flag).

## Returns

:class:`Pane`
    Self, for method chaining.

## Example

```python
>>> pane = window.active_pane
>>> new_pane = window.split()
>>> pane.refresh()
>>> active_panes = [p for p in window.panes if p.pane_active == '1']
```

## Example

```python
>>> pane in active_panes
True
>>> new_pane in active_panes
False
```

## Example

```python
>>> new_pane.pane_active == '1'
False
```

## Example

```python
>>> new_pane.select()
Pane(...)
```

## Example

```python
>>> new_pane.pane_active == '1'
True
```
