# libtmux.Session.next_window

- **Module:** libtmux.Session
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/session.py#L536
- **Page:** https://libtmux.org/reference/py/libtmux-session-next_window/

```
libtmux.Session.next_window(self) -> Window
```

Select the next window.

Wraps ``$ tmux next-window``.

## Returns

:class:`Window`
    The newly active window.

## Example

```python
>>> w = session.new_window(window_name='nw_test')
>>> session.next_window()
Window(...)
```
