# libtmux.Pane.pipe

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

```
libtmux.Pane.pipe(self, command: str | None = None, output_only: bool | None = None, input_only: bool | None = None, toggle: bool | None = None) -> None
```

Pipe pane output to a shell command via ``$ tmux pipe-pane``.

## Parameters

- `self`
- `command` (str | None) — Shell command to pipe to. If None, stops piping.
- `output_only` (bool | None) — Only pipe output from the pane (``-O`` flag).
- `input_only` (bool | None) — Only pipe input to the pane (``-I`` flag).
- `toggle` (bool | None) — Toggle piping on/off (``-o`` flag).

## Example

```python
>>> pane.pipe('cat >> /tmp/output.txt')
```

## Example

Stop piping:

```python
>>> pane.pipe()
```
