euporie.core.convert.utils

Utility functions for format converters.

Functions

call_subproc(data, cmd[, use_tempfile, suffix])

Call the command as a subprocess and return it's output as bytes.

Classes

Path(*args, **kwargs)

PurePath subclass that can make system calls.

async euporie.core.convert.utils.call_subproc(data: str | bytes, cmd: list[Any], use_tempfile: bool = False, suffix: str = '') bytes

Call the command as a subprocess and return it’s output as bytes.

Parameters:
  • data – The data to pass to the subprocess

  • cmd – The command and arguments to call

  • use_tempfile – If True, the command saves its output to a file, not stdout

  • suffix – Suffix for the temporary file name

Returns:

The data printed to standard out by the subprocess.