Results of 1 - 10 of about 35 for usage (0.006 sec.)
- argparse --- コマンドラインオプションや引数、サブコマンド向けのパーサー 13700
- argparse --- コマンドラインオプションや引数、サブコマンド向けのパーサー Added in version 3.2. ソースコード: Lib/argparse.py 注釈 argparse は基本的なコマンドラインアプリケーションの実装に推奨される標準ライブラリのモジュールですが、動作を厳密
...e のコードのアップグレード を参照してください。 ArgumentParser オブジェクト class argparse. ArgumentParser ( prog = None , usage = None , description = None , epilog = None , parents = [] , formatter_class = argparse.HelpFormatter , prefix_chars = '-'...はあとで詳しく説明しますが、簡単に言うと: prog - プログラム名 (デフォルト: __main__ モジュールの属性と sys.argv[0] から生成) usage - プログラムの利用方法を記述する文字列 (デフォルト: パーサーに追加された引数から生成されます) description - 引数のヘルプの...rog= 引数に別の値を指定できます。 >>> parser = argparse . ArgumentParser ( prog = 'myprogram' ) >>> parser . print_help () usage: myprogram [-h] options: -h, --help show this help message and exit プログラム名は、 sys.argv[0] 、 __main__ モジュールの属... - https://man.mtool.work/python/3.14/library/argparse.html
- Argparse チュートリアル 13350
- Argparse チュートリアル author : Tshepang Mbambo このチュートリアルでは、 argparse を丁寧に説明します。 argparse は、Python 標準ライブラリの一部であり、おすすめのコマンドライン引数の解析モジュールです。 注釈 標準ライブラリには、コマンドライ
...drwxr-xr-x 14 wena wena 4096 Feb 7 00:59 pypy -rw-r--r-- 1 wena wena 741 Feb 18 01:01 rm-unused-function.patch $ ls --help Usage: ls [OPTION]... [FILE]... List information about the FILEs (the current directory by default). Sort entries alphabetically...se . ArgumentParser () parser . parse_args () 下記がこのコードを実行した結果です: $ python prog.py $ python prog.py --help usage: prog.py [-h] options: -h, --help show this help message and exit $ python prog.py --verbose usage: prog.py [-h] prog.py:...error: unrecognized arguments: --verbose $ python prog.py foo usage: prog.py [-h] prog.py: error: unrecognized arguments: foo こんなことが起こりました: オプションなしでスクリプトを実行した結... - https://man.mtool.work/python/3.14/howto/argparse.html
- optparse --- コマンドラインオプションのパーサー 12061
- optparse --- コマンドラインオプションのパーサー ソースコード: Lib/optparse.py 引数解析ライブラリの選択 標準ライブラリには、引数を解析するライブラリが三つあります。 getopt : C の手続き型の getopt API に忠実に対応するモジュールです。 optparse
...ります。 例えば、次のような違いがあります。 supplying -o -v gives output="-v" and verbose=False when using optparse , but a usage error with argparse (complaining that no value has been supplied for -o/--output , since -v is interpreted as meaning the...verbosity flag) similarly, supplying -o -- gives output="--" and args=() when using optparse , but a usage error with argparse (also complaining that no value has been supplied for -o/--output , since -- is interpreted as termina...いずれかを実行すると < yourscript > - h < yourscript > -- help optparse はスクリプトのオプションを簡潔にまとめて表示します。 Usage: <yourscript> [options] Options: -h, --help show this help message and exit -f FILE, --file=FILE write report to FILE -q,... - https://man.mtool.work/python/3.14/library/optparse.html
- 3. 形式ばらない Python の紹介 8210
- 3. 形式ばらない Python の紹介 以下の例ではプロンプト ( >>> と ... ) の有無で入力と出力を区別します。例を試すには、プロンプトが表示されているときに例のプロンプトより後ろの内容をすべて入力してください。プロンプトで始まらない行はインタープリタ
...字列に含まれますが、行末に \ を付けると改行文字を含めずに済みます。次の例では最初の改行は含まれません: >>> print ( """ \ ... Usage: thingy [OPTIONS] ... -h Display this usage message ... -H hostname Hostname to connect to ... """ ) Usage: thingy [OPTION...S] -h Display this usage message -H hostname Hostname to connect to >>> 文字列は + 演算子で連結し、 * 演算子で繰り返せます: >>> # 'un' を3回繰り返し... - https://man.mtool.work/python/3.14/tutorial/introduction.html
- pprint --- データの整形表示 8115
- pprint --- データの整形表示 ソースコード: Lib/pprint.py pprint モジュールは、任意の Python データ構造を、インタープリタへの入力に使える形式で「整形表示」する機能を提供します。 整形するデータ構造に Python の基本的な型以外のオブジェクトが含ま
...itten for\n' 'that purpose.\n' '\n' 'Typical contents for this file would include an overview of ' 'the project, basic\n' 'usage examples, etc. Generally, including the project ' 'changelog in here is not\n' 'a good idea, although a simple "What\'s Ne...itten for\n' 'that purpose.\n' '\n' 'Typical contents for this file would include an overview of ' 'the project, basic\n' 'usage examples, etc. Generally, including the project ' 'changelog in here is not\n' 'a good idea, although a simple "What\'s Ne...' 'for\n' 'that purpose.\n' '\n' 'Typical contents for this file would ' 'include an overview of the project, ' 'basic\n' 'usage examples, etc. Generally, including ' 'the project changelog in here is not\n' 'a good idea, although a simple "What\'s '... - https://man.mtool.work/python/3.14/library/pprint.html
- getopt --- C 形式のコマンドラインオプション解析 7940
- getopt --- C 形式のコマンドラインオプション解析 ソースコード: Lib/getopt.py 注釈 このモジュールは機能が完成したものとされています。 この API より宣言的で拡張しやすい代替手段として、 optparse モジュールがあります。 コマンドライン引数処理のさ
...pt getopt . GetoptError as err : # ヘルプ情報を表示して終了する: print ( err ) # "option -a not recognized" などと表示する usage () sys . exit ( 2 ) output = None verbose = False for o , a in opts : if o == "-v" : verbose = True elif o in ( "-h" , "--...help" ): usage () sys . exit () elif o in ( "-o" , "--output" ): output = a else : assert False , "unhandled option" process ( args , out... - https://man.mtool.work/python/3.14/library/getopt.html
- Python言語サービス 7940
- Python言語サービス PythonにはPython言語を使って作業するときに役に立つモジュールがたくさん提供されています。これらのモジュールはトークンの切り出し、パース、構文解析、バイトコードのディスアセンブリおよびその他のさまざまな機能をサポートしていま
...われる定数 keyword --- Python キーワードのテスト tokenize --- Python ソース用のトークナイザー Tokenizing Input Command-Line Usage 使用例 tabnanny --- あいまいなインデントの検出 pyclbr --- Python モジュールブラウザーサポート Function オブジェクト クラス... - https://man.mtool.work/python/3.14/library/language.html
- gc --- ガベージコレクターインターフェース 7781
- gc --- ガベージコレクターインターフェース このモジュールは、循環ガベージコレクタの無効化・検出頻度の調整・デバッグオブションの設定などを行うインターフェースを提供します。また、検出した到達不能オブジェクトのうち、解放する事ができないオブジェ
...は少し複雑です。 詳しくは 最も古い世代の回収 を参照してください。 In the free-threaded build, the increase in process memory usage is also checked before running the collector. If the memory usage has not increased by 10% since the last collection and t... - https://man.mtool.work/python/3.14/library/gc.html
- 弱参照オブジェクト 7606
- 弱参照オブジェクト Python は 弱参照 を第一級オブジェクト (first-class object) としてサポートします。弱参照を直接実装する二種類の固有のオブジェクト型があります。第一は単純な参照オブジェクトで、第二はオリジナルのオブジェクトに対して可能な限り
...bject. This means that you should always call Py_INCREF() on the object except when it cannot be destroyed before the last usage of the borrowed reference. バージョン 3.13 で非推奨、バージョン 3.15 で削除予定: Use PyWeakref_GetRef() instead. PyObject... - https://man.mtool.work/python/3.14/c-api/weakref.html
- 1. やる気を高めよう 7606
- 1. やる気を高めよう コンピュータでさまざまな作業をしていると、いずれ自動化したい作業が出てくるでしょう。例えば、多数のテキストファイルをまとめて検索・置換したり、大量の写真ファイルの名前や配置を複雑な手順で変更したりする作業です。用途に合わ
...と進み、最後には例外やユーザー定義クラスといった高度な概念にも触れます。 他のマニュアルの関連ページ PHP features.commandline.usage Docker チュートリアル・ラボ Linux JM wargames(6) PHP introduction PHP ibm-db2.installation PHP faq.obtaining... - https://man.mtool.work/python/3.14/tutorial/appetite.html