bout_runners.submitter.local_submitter¶
Contains the local submitter class.
Classes
|
Submits a command. |
-
class
bout_runners.submitter.local_submitter.LocalSubmitter(path: Optional[pathlib.Path] = None, processor_split: None = None)[source]¶ Submits a command.
Examples
>>> LocalSubmitter().submit_command('ls') CompletedProcess(args=['ls'], returncode=0, stdout=b'__init__.py\n __pycache__\n test_local_submitter.py\n test_processor_split.py\n test_submitter_factory.py\n', stderr=b'')
- Attributes
- __pidNone or int
Getter variable for pid
- pathPath or str
Directory to run the command from
- processor_splitProcessorSplit
Object containing the processor split
pidNone or intReturn the process id.
Methods
submit_command(command)
Run a subprocess
_raise_submit_error(self, result):
Raise and error from the subprocess in a clean way.
Set the path from where the calls are made from.
- Parameters
- pathPath or str or None
Directory to run the command from If None, the calling directory will be used
- processor_splitProcessorSplit or None
Object containing the processor split If None, default values will be used
- Attributes
pidReturn the process id.
Methods
submit_command(self, command)Run a subprocess.
-
property
pid¶ Return the process id.
- Returns
- self.__pidint or None
The process id if a process has been called, else None