BaseProcessOutputReader

class ase2sprkkr.common.process_output_reader.BaseProcessOutputReader[source]

Class, that run a process, optionally saves all the output of the process to a file, and pass the stdout and stderr of the process to its two asyn routines, read_error and read_output.

The descendant can redefine the routines to parse the output (or its parts).

Class hierarchy

Inheritance diagram of ase2sprkkr.common.process_output_reader.BaseProcessOutputReader

Constructor

__init__()
async run_subprocess()[source]
result(output, error, wait)[source]

This function is for postprocessing the results.

It is intended to be predefined in the descendants

Parameters
  • output (mixed) – Result of the self.read_output

  • error (mixed) – Result of the self.read_error

  • wait (int) – The process return value

Returns

out – Currently, the tuple (output, error) is returned, however, subclasses can return anything they want.

Return type

mixed

run(cmd, outfile, print_output=False, directory=None, **kwargs)[source]
async read_error(stderr)[source]
async read_output(stdout)[source]
read_from_file(output, error=None, return_code=0, print_output=False)[source]