Skip to content

cli

mlte/cli/cli.py

Top-level command line interface.

run()

Parse command line arguments and execute specified script.

Source code in mlte/cli/cli.py
141
142
143
144
145
146
147
148
149
150
151
152
153
154
def run():
    """Parse command line arguments and execute specified script."""
    parser = _prepare_parser()
    args = vars(parser.parse_args())

    try:
        run = args.pop("func")
        return run(**args)
    except KeyError:
        parser.print_help()
        return EXIT_SUCCESS
    except Exception:
        traceback.print_exc()
        return EXIT_FAILURE