AutoArchive._services.external_command_executor

Service for executing external commands.

Modules

external_command_executor_service_identification

ExternalCommandExecutorServiceIdentification class.

class AutoArchive._services.external_command_executor.external_command_executor_service_identification.ExternalCommandExecutorServiceIdentification[source]

Bases: IServiceIdentification

Identifies External Command Executor service.

interface

alias of ExternalCommandExecutor

providerIdentificationInterface = None

_external_command_executor_service_component

ExternalCommandExecutorServiceComponent class.

class AutoArchive._services.external_command_executor._external_command_executor_service_component.ExternalCommandExecutorServiceComponent(applicationContext, serviceAccessor)[source]

Bases: IServiceComponent

Service component for external command executor.

Registers service identified as ExternalCommandExecutorServiceIdentification.

destroyServices()[source]

See: IServiceComponent.destroyServices()

_external_command_executor

ExternalCommandExecutor class.

class AutoArchive._services.external_command_executor._external_command_executor.ExternalCommandExecutor[source]

Bases: IService

Executes external commands.

execute(command, arguments=None, environment=None)[source]

Executes passed command.

Commands standard output and standard error messages are propagated through commandMessage event.

Raises:
  • OSError – If a system error occurred during command execution.

  • ChildProcessError – If the command exit code is non zero.

Executes given command as a child process.

Both standard output and standard error are captured and propagated via commandMessage() event. The order of messages written to standard output vs. standard error is not guaranteed to be preserved.

See also: ExternalCommandExecutor.execute().

commandMessage = <AutoArchive._infrastructure.py_additions.event object>