Results of 1 - 10 of about 12 for prog (0.009 sec.)
- Argparse チュートリアル 13088
- Argparse チュートリアル author : Tshepang Mbambo このチュートリアルでは、 argparse を丁寧に説明します。 argparse は、Python 標準ライブラリの一部であり、おすすめのコマンドライン引数の解析モジュールです。 注釈 標準ライブラリには、コマンドライ
...ちます。 コンセプト ls コマンドを使って、このチュートリアルで私たちが学ぶ機能をいくつか見てみましょう: $ ls cpython devguide prog.py pypy rm-unused-function.patch $ ls pypy ctypes_configure demo dotviewer include lib_pypy lib-python ... $ ls -l total 2...na wena 4096 Feb 18 18:51 cpython drwxr-xr-x 4 wena wena 4096 Feb 8 12:04 devguide -rwxr-xr-x 1 wena wena 535 Feb 19 00:05 prog.py 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 --h...import argparse parser = argparse . 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 --verb... - https://man.mtool.work/python/3.14/howto/argparse.html
- argparse --- コマンドラインオプションや引数、サブコマンド向けのパーサー 12381
- argparse --- コマンドラインオプションや引数、サブコマンド向けのパーサー Added in version 3.2. ソースコード: Lib/argparse.py 注釈 argparse は基本的なコマンドラインアプリケーションの実装に推奨される標準ライブラリのモジュールですが、動作を厳密
...す。 このオブジェクトは引数の仕様を格納し、パーサー全体に適用するオプションを持ちます。 parser = argparse . ArgumentParser ( prog = 'ProgramName' , description = 'What the program does' , epilog = 'Text at the bottom of help' ) ArgumentParser.add_argum...方法は、 Optparse のコードのアップグレード を参照してください。 ArgumentParser オブジェクト class argparse. ArgumentParser ( prog = None , usage = None , description = None , epilog = None , parents = [] , formatter_class = argparse.HelpFormatter , pre...ェクトを生成します。すべての引数はキーワード引数として渡すべきです。各引数についてはあとで詳しく説明しますが、簡単に言うと: prog - プログラム名 (デフォルト: __main__ モジュールの属性と sys.argv[0] から生成) usage - プログラムの利用方法を記述する文字列... - https://man.mtool.work/python/3.14/library/argparse.html
- optparse --- コマンドラインオプションのパーサー 8808
- optparse --- コマンドラインオプションのパーサー ソースコード: Lib/optparse.py 引数解析ライブラリの選択 標準ライブラリには、引数を解析するライブラリが三つあります。 getopt : C の手続き型の getopt API に忠実に対応するモジュールです。 optparse
...ことは妨げられませんが、そのための支援機能もほとんどありません。 例えば、下記のような架空のコマンドラインを考えてみましょう: prog - v -- report report . txt foo bar -v と --report はどちらもオプションです。 --report オプションが引数をとるとすれば、 rep...ッセージも指定できます。 次の OptionParser には、ユーザに分かりやすい説明付きのオプションを登録しています。 usage = "usage: %prog [options] arg1 arg2" parser = OptionParser ( usage = usage ) parser . add_option ( "-v" , "--verbose" , action = "store_tr...ッセージを生成できるよう、いくつもの工夫をしています。 スクリプト自体の利用法を表すメッセージを定義します: usage = "usage: %prog [options] arg1 arg2" optparse は使い方の説明に含まれる %prog を、現在のプログラム名、つまり os.path.basename(sys.argv[0])... - https://man.mtool.work/python/3.14/library/optparse.html
- optparse を使うコードを argparse に移行する 8330
- optparse を使うコードを argparse に移行する argparse モジュールは、 optparse モジュールに標準では備わっていない、次のような高水準の機能を提供します。 位置引数を扱う サブコマンドのサポート。 + , / のような代替オプションプレフィクスを許容する
...s を Namespace に置き換え、 optparse.OptionError と optparse.OptionValueError を ArgumentError に置き換える。 %default や %prog などの暗黙の引数を含む文字列を、 %(default)s や %(prog)s などの、通常の Python で辞書を使う場合のフォーマット文字列に置き換... - https://man.mtool.work/python/3.14/howto/argparse-optparse.html
- curses --- 文字セル表示のターミナル処理 8030
- curses --- 文字セル表示のターミナル処理 ソースコード: Lib/curses curses モジュールは、移植可能な高度な端末処理の事実上の標準である curses ライブラリへのインターフェースを提供します。 curses が最も広く用いられているのは Unix 環境ですが、Wind
...送出されます。多くの端末では、"可視 (通常)" モードは下線カーソルで、"非常に可視" モードはブロックカーソルです。 curses. def_prog_mode ( ) 現在の端末属性を、稼動中のプログラムが curses を使う際のモードである "プログラム" モードとして保存します。(このモ...ードの反対は、プログラムが curses を使わない "シェル" モードです。) その後 reset_prog_mode() を呼ぶとこのモードを復旧します。 curses. def_shell_mode ( ) 現在の端末属性を、稼動中のプログラムが curses を使ってい...for half-delay mode, which is similar to cbreak mode in that characters typed by the user are immediately available to the program. However, after blocking for tenths tenths of seconds, if nothing has been typed, getch() returns -1 , while getkey() a... - https://man.mtool.work/python/3.14/library/curses.html
- 10. 標準ライブラリをひとめぐり 7977
- 10. 標準ライブラリをひとめぐり 10.1. オペレーティングシステムとのインターフェース os モジュールは、オペレーティングシステムと対話するための多くの関数を提供しています: >>> import os >>> os . getcwd () # Return the current working directory '
...、1 つ以上のファイル名と、必要に応じて指定する表示行数を取り出します。 import argparse parser = argparse . ArgumentParser ( prog = 'top' , description = 'Show top lines from each file' ) parser . add_argument ( 'filenames' , nargs = '+' ) parser . add... - https://man.mtool.work/python/3.14/tutorial/stdlib.html
- errno --- 標準の errno システムシンボル 7941
- errno --- 標準の errno システムシンボル このモジュールから標準の errno システムシンボルを取得することができます。個々のシンボルの値は errno に対応する整数値です。これらのシンボルの名前は、 linux/include/errno.h から借用されており、網羅的なは
...ます (Memory page has hardware error)。 Added in version 3.14. errno. EALREADY 操作はすでに進行中です (Operation already in progress)。 このエラーは例外 BlockingIOError に対応します。 errno. EINPROGRESS 操作は現在進行中です (Operation now in progress)...ます (Too many processes)。 Added in version 3.2. errno. EPROCUNAVAIL プログラムに対する手続きが不正です (Bad procedure for program)。 Added in version 3.2. errno. EPROGMISMATCH プログラムのバージョンが違います (Program version wrong)。 Added in versi...on 3.2. errno. EPROGUNAVAIL RPC プログラムが利用できません (RPC prog. not avail)。 Added in version 3.2. errno. EPWROFF デバイスの電源が切れてい... - https://man.mtool.work/python/3.14/library/errno.html
- re --- 正規表現操作 7941
- re --- 正規表現操作 ソースコード: Lib/re/ このモジュールは Perl に見られる正規表現マッチング操作と同様のものを提供します。 パターンおよび検索される文字列には、Unicode 文字列 ( str ) や 8 ビット文字列 ( bytes ) を使います。ただし、Unicode 文
...指定して、正規表現の動作を変更できます。 flags の各変数を、ビット単位 OR ( | 演算子) で組み合わせて指定できます。 シーケンス prog = re . compile ( pattern ) result = prog . match ( string ) は、以下と同等です result = re . match ( pattern , string ) が... - https://man.mtool.work/python/3.14/library/re.html
- venv --- 仮想環境の作成 7906
- venv --- 仮想環境の作成 Added in version 3.3. ソースコード: Lib/venv/ venv モジュールは、軽量な「仮想環境」の作成に対応しています。 各仮想環境は、それぞれの site ディレクトリに独立した Python パッケージ群を持ちます。 仮想環境は、インストール
...the created virtual environment. :param nopip: If true, pip is not installed into the created virtual environment. :param progress: If setuptools or pip are installed, the progress of the installation can be monitored by passing a progress callable....If specified, it is called with two arguments: a string indicating some progress, and a context indicating where the string is coming from. The context argument can have one of three values: 'main',...ng lines from the output streams of a subprocess which is used to install the app. If a callable is not specified, default progress information is output to sys.stderr. """ def __init__ ( self , * args , ** kwargs ): self . nodist = kwargs . pop ( 'n... - https://man.mtool.work/python/3.14/library/venv.html
- Python ドキュメントの目次 7871
- Python ドキュメントの目次 What's New in Python What's new in Python 3.14 概要 -- リリースハイライト 新しい機能 PEP 649 と PEP 749 : アノテーションの遅延評価 PEP 734 : 複数インタープリタ機能が標準ライブラリに追加 PEP 750 : テンプレート文字列
...ル手順 5.1.2. Python スクリプトの実行方法 5.2. Alternative Distributions 5.3. Installing Additional Python Packages 5.4. GUI Programming 5.5. Advanced Topics 5.5.1. Installing Free-threaded Binaries 5.5.2. コマンドラインからのインストール 5.5.3. Distri...ンターフェースライブラリ argparse --- コマンドラインオプションや引数、サブコマンド向けのパーサー ArgumentParser オブジェクト prog usage description epilog parents formatter_class prefix_chars fromfile_prefix_chars argument_default allow_abbrev conflict...ttk.Spinbox ノートブック オプション タブのオプション タブの識別子 仮想イベント ttk.Notebook プログレスバー オプション ttk.Progressbar セパレータ オプション サイズグリップ プラットフォーム固有のメモ バグ ツリービュー オプション 要素のオプション タグの... - https://man.mtool.work/python/3.14/contents.html