# libtmux.Pane.pipe

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