graph LR
delegator_Command["delegator.Command"]
OS_Process_Management["OS Process Management"]
pexpect["pexpect"]
delegator_run["delegator.run"]
delegator_pipe["delegator.pipe"]
delegator_Command -- "acts as a wrapper/facade over" --> pexpect
delegator_Command -- "utilizes" --> pexpect
delegator_Command -- "directly interfaces with" --> OS_Process_Management
OS_Process_Management -- "is controlled by" --> delegator_Command
delegator_run -- "instantiates and utilizes" --> delegator_Command
delegator_pipe -- "instantiates and utilizes" --> delegator_Command
delegator_run -- "serves as API entry point for" --> delegator_Command
delegator_pipe -- "serves as API entry point for" --> delegator_Command
The delegator subsystem is centered around the delegator.Command component, which encapsulates the logic for interacting with external processes. This central component directly interfaces with underlying OS Process Management capabilities (via Python's subprocess module) and acts as a facade over the pexpect library to provide advanced interactive features. High-level functions like delegator.run and delegator.pipe serve as primary API entry points, simplifying common use cases by instantiating and orchestrating delegator.Command instances. This design effectively abstracts complex process management, offering a user-friendly interface while maintaining robust control over subprocess execution and interaction.
This is the core component responsible for managing the lifecycle of a single external subprocess. It provides methods for sending input to the subprocess, expecting specific output patterns, and controlling its execution (termination, killing, blocking). It acts as a facade over lower-level process management mechanisms and leverages the pexpect library for interactive features.
Related Classes/Methods:
delegator.Commanddelegator.Command:senddelegator.Command:expectdelegator.Command:terminatedelegator.Command:killdelegator.Command:block
Represents the fundamental capabilities provided by the operating system for creating, managing, and terminating processes. While external to the delegator library, delegator.Command directly interfaces with these capabilities, primarily through Python's subprocess module.
Related Classes/Methods: None
An external Python library that provides a high-level interface for controlling other programs, especially those that present a pseudo-terminal interface. delegator.Command leverages pexpect for its interactive features, such as expecting specific output patterns.
Related Classes/Methods: None
A high-level function that serves as a primary entry point for users to execute a single command. It abstracts the direct instantiation and basic usage of delegator.Command, providing a simplified API for common command execution needs.
Related Classes/Methods:
A high-level function designed for chaining multiple command operations, mimicking the shell's pipe (|) functionality. It orchestrates the execution and output redirection between multiple commands, often by managing multiple delegator.Command instances internally.
Related Classes/Methods: