# libtmux.Pane.from_pane_id

- **Module:** libtmux.Pane
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pane.py#L183
- **Page:** https://libtmux.org/en/py/latest/reference/libtmux-pane-from_pane_id/

```
libtmux.Pane.from_pane_id(cls, server: Server, pane_id: str) -> Pane
```

Create Pane from existing pane_id.

tmux's ``cmd_find`` routes a ``-t`` target by *sigil*, so a ``%``-id
handed to ``list-panes`` resolves to that pane's window and lists it.
Every row comes back stamped with the session tmux considers canonical
for that window -- the most recently active one -- which is the same
session ``display-message -t %ID '#{session_id}'`` reports. A window
linked into several sessions therefore gets one authoritative answer
instead of "whichever session sorted last".

## Parameters

- `cls`
- `server` (Server): The tmux server holding the pane.
- `pane_id` (str): Pane id, e.g. ``"%3"``.

## Returns

:class:`Pane`

## Raises

- `TmuxObjectDoesNotExist`: When no such pane exists on a reachable server.
- `LibTmuxException`: When tmux itself is unreachable.

## Example

```python
>>> Pane.from_pane_id(server=pane.server, pane_id=pane.pane_id)
Pane(%1 Window(@1 1:..., Session($1 ...)))
```
