-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Better Windows CLI name #51
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
Comments
This looks like it can be improved. Perhaps only the basename of sys.argv[0] should be shown in the Usage section. What do you think? To answer your question 1: yes, there is an undocumented argument to the Fire() function that you can use: To answer your question 2, no, the only way to set the --help is to update your docstrings (of course the help also changes when the function signature changes, or the object's members change, etc). There is also a plan to improve some of the usage strings further. |
I agree that this should be cleaner and clearer. Two pieces to this:
We do use sys.argv[0] currently. I guess on Windows sometimes sys.argv[0] has the whole path? |
Update: |
Created pull request.
|
…ram name (#59) * Uses os.path.basename(sys.argv[0]) for default program name
I'm confused with the verbose meaning, for me, w/o any knowledge about the internals overlaps a bit the "debug" concept. How about with different levels? We could reuse verbose parameter. Something like this.
|
Currently verbose only controls whether private methods/members are shown. That is, those members that start with an underscore. And currently debug does not exist. Moving forward we'll want to clean up the default output of CLIs. One way to do this would be to introduce the debug flag which would be set by the developer. Another way to do this would be to modify the meaning of verbose, which is used by the CLI user. Whichever approach we go with, you have the right idea about what will have to change ^^ in helputils. |
Thanks for the clarification :). It sounds like If it should be split into two parameters, or create an intermediate object it's just a design decision. |
Closing this ticket since the title-issue (the CLI name) is fixed. |
Windows user here.
Could that be possible to add a configuration to modify the default CLI name ? Right now, depending on the user way to interact with the script, it can become noisy.
e.g. When launching a script directly with a .py, it can become noisy:

e.g. A worse case senario with

CLI_FIRE_A_BIG_NAME_FOR_SCRIPT.py
in a directory far far away.e.g. In the best case scenario, it can be attenuated if you have setup Python.exe in your environment variable.

Questions:
Thanks.
The text was updated successfully, but these errors were encountered: