CLI parsing=?utf-8?B?4oCU?=with `--help` text=?utf-8?B?4oCU?=`--foo bar`, how to give additional parameters to `bar`?

Dieter Maurer dieter at handshake.de
Thu Oct 15 12:14:48 EDT 2020


Samuel Marks wrote at 2020-10-15 20:53 +1100:
> ...
>To illustrate the issue, using `ml-params` and ml-params-tensorflow:
> ...
>What's the right solution here?

While Python provides several modules in its standard library
to process parameters (e.g. the simple `getopt` and the flexible `argparse`),
it is up to the "application" whether it uses such a module (and which one)
or whether it handle arguments on its own.

Apparently, `ml_param` is not a staudard Python module.
Is it a package of your own? Then I suggest to check `argparse` whether
it supports your use case (I know, it can be customized to do it,
but maybe, it does it already out of the box).

If `ml_param` is a third party module, then the question
is actually an `ml_param` question. Ask its support mailing lists
or have a look at its source.



More information about the Python-list mailing list