# libtmux.Window.from_window_id

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

```
libtmux.Window.from_window_id(
    cls, server: Server, window_id: str
) -> Window
```

Create Window from existing window_id.

tmux's ``cmd_find`` routes a ``-t`` target by *sigil*, so an ``@``-id
handed to [`list-windows`](/en/tmux/latest/manual/list-windows/) resolves to that window's session and lists
it. The rows come back stamped with the session tmux considers
canonical for the window -- the most recently active one -- so a window
linked into several sessions reports the same parent tmux itself would.

## Examples

```python
>>> Window.from_window_id(server=window.server, window_id=window.window_id)
Window(@1 1:..., Session($1 ...))
```

## Parameters

- `server` (`Server`): The tmux server holding the window.
- `window_id` (`str`): Window id, e.g. ``"@3"``.

## Returns

:class:`Window`

## Raises

- [`TmuxObjectDoesNotExist`](/en/py/stable/reference/libtmux-exc-tmuxobjectdoesnotexist/): When no such window exists on a reachable server.
- [`LibTmuxException`](/en/py/stable/reference/libtmux-exc-libtmuxexception/): When tmux itself is unreachable.
