datalad_next.shell.FixedLengthResponseGenerator
- class datalad_next.shell.FixedLengthResponseGenerator(stdout: OutputFrom, length: int)[source]
Bases:
ShellCommandResponseGenerator
Response generator for efficient handling of outputs of known length
This response generator is used to execute commands that have an output of known length. The final command list it creates will execute the command and print the return code followed by a newline.
The
send()
-method of this response generator will read the specified number of bytes and a trailing return code. This is more performant than scanning the output for an end-marker.