clize icon indicating copy to clipboard operation
clize copied to clipboard

`python -m clize path.to.a.function` (Clize launcher)

Open epsy opened this issue 7 years ago • 0 comments

Given that Clize now supports most decorators and docstring formats, the time seems right to introduce this idea again:

$ python -m clize some_module.some_function arguments for --that function

would be (roughly) equivalent to the Python code:

from some_module import some_function
some_function('arguments', 'for', that='function')

Additionally, an entry point can be added to setup so that you can use clize ... instead of python -m clize ....

Tips:

  • some_function may not be directly importable, e.g. some_module.SomeClass.some_classmethod
  • The Usage: line of the --help output needs to match what was entered.
  • You can most likely use a Clize CLI for this :)

epsy avatar Apr 28 '17 05:04 epsy