mcot.utils.scripts

Utilities to create a common interface to all the scripts.

Classes

ScriptDirectories([names])

All script directories that have been registered.

Functions

get_docstring(filename)

Extracts the filename from the docstring.

load_all_mcot()

run([argv])

run_script(add_to_parser, run_from_args[, argc])

Run script from command line.

get_docstring

mcot.utils.scripts.get_docstring(filename)[source]

Extracts the filename from the docstring.

Parameters

filename – path to python file

Returns

module-level docstring (None if undefined)

load_all_mcot

mcot.utils.scripts.load_all_mcot()[source]

run

mcot.utils.scripts.run(argv=None)[source]

run_script

mcot.utils.scripts.run_script(add_to_parser, run_from_args, argc=None)[source]

Run script from command line.

Parameters
  • add_to_parser – function that takes an argument parser and adds information to it

  • run_from_args – function that runs the script based on the arguments of the parser

  • argc – command line arguments