lmpy.tools._config_parser

Module containing a tool for parsing a configuration file for argparse.

Module Contents

Functions

_process_arguments(parser[, config_arg])

Process arguments including filling in those provided by configuration file.

test_files(*filename_filefunction)

Get a logger object (or None) for the provided parameters.

lmpy.tools._config_parser._process_arguments(parser, config_arg=None)[source]

Process arguments including filling in those provided by configuration file.

Parameters
  • parser (argparse.ArgumentParser) – An argparse.ArgumentParser with parameters.

  • config_arg (str) – If provided, try to read configuration file for additional arguments.

Returns

An augmented Namespace with any parameters specified in a

configuration file.

Return type

argparse.Namespace

Raises

FileNotFoundError – on non-existent config_file.

lmpy.tools._config_parser.test_files(*filename_filefunction)[source]

Get a logger object (or None) for the provided parameters.

Parameters

filename_filefunction (str) – One or more filename/filefunction tuples

Returns

A message indicating missing files. If all exist, the message is empty string.