# libtmux.Pane.split_window

- **Module:** libtmux.Pane
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/9fdd083a8181a827889337b63cd4e6daea661a8c/src/libtmux/pane.py#L2762
- **Page:** https://libtmux.org/en/py/latest/reference/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``.
