# libtmux.Window.__getitem__

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

```
libtmux.Window.__getitem__(self, key: str) -> t.Any
```

Return item lookup by key. Deprecated in favor of attributes.

## Deprecated

0.17 — Deprecated in favor of attributes. e.g. ``window['window_name']`` is now
accessed via ``window.window_name``.

## Parameters

- `key` (`str`)
