Files & processes · BUILT-IN MODULE

subprocess

Shell process helpers.

Quick start

use subprocess
use subprocess

out = try subprocess.output "echo SE"
say out

API reference

subprocess.run command

Run a shell command. Fallible.

執行 a shell command. 此操作可能失敗。
subprocess.output command

Capture shell command output. Fallible.

擷取 shell command output. 此操作可能失敗。