Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
epsy opened this issue Apr 28, 2017 · 0 comments
Open

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

epsy opened this issue Apr 28, 2017 · 0 comments
Milestone

Comments

@epsy
Copy link
Owner

epsy commented Apr 28, 2017

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 epsy added this to the 4.1 milestone Apr 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant