IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: Nightly
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

subprocess

Execute external processes and commands.

The subprocess package provides utilities for spawning and interacting with external processes. It enables running shell commands, capturing their output, and integrating external tools into Mojo programs. This package handles process execution, output capture, and resource cleanup automatically.

Use this package when you need to execute shell commands, integrate with external tools, or automate system tasks from within Mojo code.

Modules

  • subprocess: Provides utilities for executing shell commands and capturing output.