:tocdepth: 3 :py:mod:`gws.lib.cli` ===================== .. py:module:: gws.lib.cli .. autoapi-nested-parse:: Utilities for CLI commands. **Source code:** :source:`gws.lib.cli` Package Contents ---------------- .. py:function:: cprint(clr, msg) .. py:function:: ensure_dir(path, clear=False) .. py:function:: error(msg) .. py:function:: exec(cmd) .. py:function:: fatal(msg) .. py:function:: find_dirs(dirname) .. py:function:: find_files(dirname, pattern=None, deep=True) .. py:function:: info(msg) .. py:function:: main(name, main_fn, usage) .. py:function:: parse_args(argv) .. py:class:: ProgressIndicator(title, total=0, resolution=10) .. py:attribute:: lastd :value: 0 .. py:attribute:: progress :value: 0 .. py:attribute:: resolution :value: 10 .. py:attribute:: starttime :value: 0 .. py:attribute:: title .. py:attribute:: total :value: 0 .. py:method:: log(s) .. py:method:: update(add=1) .. py:function:: read_file(path) .. py:function:: run(cmd) .. py:data:: SCRIPT_NAME :value: '' .. py:function:: text_table(data, header=None, delim=' | ') Format a list of dicts as a text-mode table. .. py:function:: warning(msg) .. py:function:: write_file(path, text)