per page, with , order by , clip by
Results of 1 - 1 of about 1 for myprogram (0.002 sec.)
argparse --- コマンドラインオプションや引数、サブコマンド向けのパーサー 9414
argparse --- コマンドラインオプションや引数、サブコマンド向けのパーサー Added in version 3.2. ソースコード: Lib/argparse.py 注釈 argparse は基本的なコマンドラインアプリケーションの実装に推奨される標準ライブラリのモジュールですが、動作を厳密 ... 。 変更したい場合は、 ArgumentParser の prog= 引数に別の値を指定できます。 >>> parser = argparse . ArgumentParser ( prog = 'myprogram' ) >>> parser . print_help () usage: myprogram [-h] options: -h, --help show this help message and exit プログラム名は、 s ... から決まった場合でも、ヘルプ内で書式指定子 %(prog)s を使って参照できます。 >>> parser = argparse . ArgumentParser ( prog = 'myprogram' ) >>> parser . add_argument ( '--foo' , help = 'foo of the %(prog)s program' ) >>> parser . print_help () usage: myprogra ... m [-h] [--foo FOO] options: -h, --help show this help message and exit --foo FOO foo of the myprogram program バージョン 3.14 で変更: デフォルトの prog 値は、常に os.path.basename(sys.argv[0]) になるのではなく、 __main__ の実 ...
https://man.mtool.work/python/3.14/library/argparse.html
PREV 1 NEXT