astro_metadata_translator.bin.translateheader.process_files(files, regex, hdrnum, print_trace, outstream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>, errstream=<_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'>, output_mode='auto')

Read and translate metadata from the specified files.

files : iterable of str

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

regex : str

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

hdrnum : int

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

print_trace : bool

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.

outstream : io.StringIO, optional

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

errstream : io.StringIO, optional

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

output_mode : str, optional

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

okay : list of str

All the files that were processed successfully.

failed : list of str

All the files that could not be processed.