# libtmux.Window.select

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

tmux command: [`select-window`](/en/tmux/latest/manual/select-window/)

```
libtmux.Window.select(self) -> Window
```

Select window.

To select a window object asynchrously. If a ``window`` object exists
and is no longer the current window, ``w.select_window()``
will make ``w`` the current window.

## Examples

```python
>>> window = session.active_window
>>> new_window = session.new_window()
>>> session.refresh()
>>> active_windows = [w for w in session.windows if w.window_active == '1']
```

```python
>>> new_window.window_active == '1'
False
```

```python
>>> new_window.select()
Window(...)
```

```python
>>> new_window.window_active == '1'
True
```

## In other ports

### Make a window active

- Lua: [`libtmux.WindowLink:select`](/en/lua/latest/reference/libtmux-windowlink-select/) (method)
- TypeScript: [`window.Window.select`](/en/ts/latest/reference/window-window-select/) (method)
- Rust: [`window.Window.select`](/en/rs/latest/reference/window-window-select/) (method)
- Go: [`tmux.Window.Select`](/en/go/latest/reference/tmux-window-select/) (method)
- Java: [`io.github.libtmux.Window.Window.select`](/en/java/latest/reference/io-github-libtmux-window-window-select/) (method)
- C#: [`LibTmux.Window.SelectAsync`](/en/csharp/latest/reference/libtmux-window-selectasync/) (method)
- C++: [`libtmux::Window::select`](/en/cxx/latest/reference/libtmux-window-select/) (method)
- Swift: [`Server.select(_:)`](/en/swift/latest/reference/server-select(_-)/) (method)
