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: AutoArchive._infrastructure.service.iservice_identification.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: AutoArchive._infrastructure.service.iservice_component.IServiceComponent

Service component for external command executor.

Registers service identified as ExternalCommandExecutorServiceIdentification.

destroyServices()[source]

See: IServiceComponent.destroyServices()

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

Bases: AutoArchive._infrastructure.service.iservice_component.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: AutoArchive._infrastructure.service.iservice.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>
class AutoArchive._services.external_command_executor._external_command_executor.ExternalCommandExecutor[source]

Bases: AutoArchive._infrastructure.service.iservice.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>