# libtmux.Pane.split_window

- **Module:** libtmux.Pane
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/pane.py#L2762
- **Page:** https://libtmux.org/reference/py/libtmux-pane-split_window/

```
libtmux.Pane.split_window(self, target: int | str | None = None, attach: bool = False, start_directory: StrPath | None = None, vertical: bool = True, shell: str | None = None, size: str | int | None = None, percent: int | None = None, # deprecated, environment: dict[str, str] | None = None) -> Pane
```

Split window at pane and return newly created :class:`Pane`.

## Parameters

- `self`
- `target` (int | str | None)
- `attach` (bool) — Attach / select pane after creation.
- `start_directory` (StrPath | None) — specifies the working directory in which the new pane is created.
- `vertical` (bool) — split vertically
- `shell` (str | None)
- `size` (str | int | None)
- `percent` (int | None) — percentage to occupy with respect to current pane
- `# deprecated`
- `environment` (dict[str, str] | None) — Environmental variables for new pane. Passthrough to ``-e``.
