astro_metadata_translator.bin.translateheader.process_files(files: ~typing.Sequence[str], regex: str, hdrnum: int, print_trace: bool, outstream: ~typing.IO = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, errstream: ~typing.IO = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>, output_mode: str = 'auto') Tuple[List[str], List[str]]

Read and translate metadata from the specified files.

filesiterable of str

The files or directories from which the headers are to be read.


Regular expression string used to filter files when a directory is scanned.


The HDU number to read. The primary header is always read and merged with the header from this HDU.


If there is an error reading the file and this parameter is True, a full traceback of the exception will be reported. If False prints a one line summary of the error condition.

outstreamio.StringIO, optional

Output stream to use for standard messages. Defaults to sys.stdout.

errstreamio.StringIO, optional

Stream to send messages that would normally be sent to standard error. Defaults to sys.stderr.

output_modestr, optional

Output mode to use for the translated information. “auto” switches based on how many files are found.

okaylist of str

All the files that were processed successfully.

failedlist of str

All the files that could not be processed.