espnet3.utils.logging.format_command
Less than 1 minute
espnet3.utils.logging.format_command
espnet3.utils.logging.format_command(argv: Iterable[str] | None = None) → str
Format command arguments into a shell-escaped string.
- Parameters:argv (Iterable *[*str ] | None) – Command arguments. If
None, usessys.argv. - Returns: A single string with each argument shell-escaped.
- Return type: str
Example
>>> format_command(["python", "train.py", "--exp", "my run"])
"python train.py --exp 'my run'"