command_arguments#
Run commands and agent-written programs inside an operating-system boundary. See the guide.
- zett_agent.sandbox.policy.command_arguments(command, *, shell='/bin/sh')[源代码]#
Return the argument vector for a command given as a shell string or as arguments.
A string runs through
shell -c, so pipes and redirections work. A sequence runs directly, which is the safer form for a program and its arguments because nothing is parsed.- 抛出:
SandboxPolicyError -- If the command is empty or contains NUL.
- 参数:
command (str | Sequence[str])
shell (str)
- 返回类型:
tuple[str, ...]