output_handlers module
- class batchtools.output_handlers.OutputProcessHandler(process, print_stdout=True, print_stderr=True)
Bases:
objectBase class used by the different batchtool’s OutputHandler object. It wrapped a Popen process and handle the output stream. It stop python interpreter during the time it takes for the process to finish, in same way that Popen.wait() function. the OutputProcessHandler but manage the Popen process itself (return of batchtool command).
- Parameters:
process (subprocess.Popen) – a Popen process, usually come from a batchtool call
print_stdout (bool) – print the stdout stream
print_stderr (bool) – print the stderr stream
- dump(iostream)
Dump the output in an iostream
- Parameters:
iostream
- Returns:
- get_results()
- property output
return a list<dict> from the raw output data
- Returns:
dict
- print_stderr()
- print_stdout()
- property returncode
- property stderr
- property stdout
- wait()
only here for future retro compatibility, if we move OutputHandler as default return result and avoid error. :return:
- exception batchtools.output_handlers.OutputProcessHandlerPipeError(msg)
Bases:
Exception- add_note(object, /)
Exception.add_note(note) – add a note to the exception
- args
- with_traceback(object, /)
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class batchtools.output_handlers.SbsRenderOutputHandler(*args, **kwargs)
Bases:
OutputProcessHandlerSbsRenderOutputHandler handle the batchtools.sbsrender_render output. It can retrieve the different output data like a data formed list<dict> or a dedicated list<object> for each graph data:
SbsRenderGraphStruct- Parameters:
args
kwargs
- dump(iostream)
Dump the output in an iostream
- Parameters:
iostream
- Returns:
- get_results()
Parse output data and return a correspondent objects list
- Returns:
list<
SbsRenderGraphStruct>
- get_results_as_dict()
Parse output data and return a list of dict
- Returns:
list<dict>
- property output
return a list<dict> from the raw output data
- Returns:
dict
- print_stderr()
- print_stdout()
- property returncode
- property stderr
- property stdout
- wait()
only here for future retro compatibility, if we move OutputHandler as default return result and avoid error. :return:
- class batchtools.output_handlers.SpotColorInfoOutputHandler(*args, **kwargs)
Bases:
OutputProcessHandlerSpotColorInfoOutputHandler handle the batchtools.spotcolorinfo output. It can retrieve the different output data like a data formed list<dict> or a dedicated list<object> for each graph data:
SpotColorInfoStruct- Parameters:
args
kwargs
- dump(iostream)
Dump the output in an iostream
- Parameters:
iostream
- Returns:
- get_results()
Parse output data and return a correspondent objects list
- Returns:
list<
SpotColorInfoStruct>
- get_results_as_dict()
Parse output data and return a list of dict
- Returns:
list<dict>
- property output
return a list<dict> from the raw output data
- Returns:
dict
- print_stderr()
- print_stdout()
- property returncode
- property stderr
- property stdout
- wait()
only here for future retro compatibility, if we move OutputHandler as default return result and avoid error. :return:
- class batchtools.output_handlers.Substance3dBakerInfoOutputHandler(*args, **kwargs)
Bases:
OutputProcessHandlerSubstance3dBakerOutputHandler handle the batchtools.substance3d_baker_info output. It can retrieve the different output data like a data formed list<dict> or a dedicated list<object> for each graph data:
Substance3dBakerInfoMeshStruct- Parameters:
args
kwargs
- dump(iostream)
Dump the output in an iostream
- Parameters:
iostream
- Returns:
- get_results()
Parse output data and return a correspondent objects list
- Returns:
- property output
return a list<dict> from the raw output data
- Returns:
dict
- print_stderr()
- print_stdout()
- property returncode
- property stderr
- property stdout
- wait()
only here for future retro compatibility, if we move OutputHandler as default return result and avoid error. :return:
- batchtools.output_handlers.extract_cmd_output_without_logs(output)