Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Python API

Python documentation

libtmux.Server.load_buffer

Python

View as Markdown

Module
libtmux
Declared in
Server
Package
libtmux
Source
src/libtmux/server.py
Other languages
Ruby Lua TypeScript Rust Go Java .NETC++Swift
load_buffer ( self , path : StrPath , buffer_name : str | None = None ) → None
method [source]
method [source]
load_buffer

Load a file into a paste buffer via $ tmux load-buffer.

Parameters
  • path ( StrPath ) – File path to load into the buffer.

  • buffer_name ( str | None ) – Name of the buffer (-b flag).

In other ports Fill a paste buffer from a file

Examples

>>> import pathlib
>>> path = pathlib.Path(request.config.rootdir) / '..' / 'tmp_load.txt'
>>> _ = path.write_text('loaded')
>>> server.load_buffer(str(path), buffer_name='loaded_buf')
await server.loadBuffer("payload", new Uint8Array([0x68, 0x69]));

0 declared, 0 inherited

Esc

Type to search.