-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Hi, there.
argparse
I have a package xxx and use argparse to create a CLI, and use a batch script to call it.
In xxx/__main__ I can pass __package__ to prog to set the program name as xxx
parser = argparse.ArgumentParser(prog=__package__, description=__doc__)batch script xxx.bat
@echo off
setlocal
set PYTHONPATH=%~dp0;%PYTHONPATH%
call python -m %~n0 %*argparse is not easy to use, so I migrate to click.
click
use click, I pass __package__ to name but it not works. (I don't know exactly what the parameter name is :)
@click.group(name=__package__)
I find click will auto detect the program name by _detect_program_name() at click/utils.py:523
Is it able to set by user?
Metadata
Metadata
Assignees
Labels
No labels