Results of 1 - 10 of about 55 for lines (0.005 sec.)
- traceback --- スタックトレースの表示または取得 12181
- traceback --- スタックトレースの表示または取得 ソースコード: Lib/traceback.py このモジュールは、Python プログラムのスタックトレースを抽出、書式化、表示する標準的なインターフェースを提供します。 インタープリタのデフォルトのトレースバック表示
...プションがあります。 class traceback. TracebackException ( exc_type , exc_value , exc_traceback , * , limit = None , lookup_lines = True , capture_locals = False , compact = False , max_group_width = 15 , max_group_depth = 10 ) 後で表示するために例外の...情報を取得します。 limit 、 lookup_lines 、 capture_locals の意味は StackSummary クラスと同じです。 compact が真の場合は、 TracebackException の format() メソッドに...rsion 3.10. msg 構文エラー用 - コンパイラのエラーメッセージ。 classmethod from_exception ( exc , * , limit = None , lookup_lines = True , capture_locals = False , compact = False , max_group_width = 15 , max_group_depth = 10 ) 後のレンダリングのために... - https://man.mtool.work/python/3.14/library/traceback.html
- curses --- 文字セル表示のターミナル処理 11161
- curses --- 文字セル表示のターミナル処理 ソースコード: Lib/curses curses モジュールは、移植可能な高度な端末処理の事実上の標準である curses ライブラリへのインターフェースを提供します。 curses が最も広く用いられているのは Unix 環境ですが、Wind
...。 curses. filter ( ) filter() ルーチンを使用する場合は、 initscr() より前に呼び出す必要があります。 これにより、初期化時に LINES が 1 に設定され、機能 clear 、 cup 、 cud 、 cud1 、 cuu1 、 cuu 、 vpa が無効になり、 home 文字列が cr の値に設定されます...イバのキュー内の出力がすべてフラッシュされます。 flag が False の場合、フラッシュは行われません。 curses. is_term_resized ( nlines , ncols ) resize_term() を呼び出した場合にウィンドウ構造が変更されるなら True を、そうでなければ False を返します。 curses...も呼び出さない場合、マウスイベントは一切通知されません。 curses. napms ( ms ) ms ミリ秒間スリープします。 curses. newpad ( nlines , ncols ) 与えられた行とカラム数を持つパッド (pad) データ構造を生成し、そのポインタを返します。パッドはウィンドウオブジェク... - https://man.mtool.work/python/3.14/library/curses.html
- difflib --- 差分の計算の補助 10407
- difflib --- 差分の計算の補助 ソースコード: Lib/difflib.py このモジュールはシーケンスを比較するクラスと関数を提供します。 その多くは、テキスト行のシーケンス (文字列のリストや ファイルオブジェクト など) を比較し、相違点を報告する 差分 (diff)
...、末尾に改行のある 1 行ずつの文字列で構成されていなければなりません。 このようなシーケンスは、ファイル類似オブジェクトの readlines() メソッドで取得できます。 生成される差分も末尾に改行のある文字列で構成され、ファイル類似オブジェクトの writelines() メソッ...デフォルト値および説明は ndiff() のドキュメントを参照してください。 以下のメソッドが public になっています: make_file ( fromlines , tolines , fromdesc = '' , todesc = '' , context = False , numlines = 5 , * , charset = 'utf-8' ) fromlines と tolines (い...ぞれ差分元、差分先ファイルのカラムのヘッダになる文字列を指定します (いずれもデフォルト値は空文字列です)。 context および numlines はともにオプションのキーワード引数です。 context を True にするとコンテキスト差分を表示し、デフォルトの False にすると完全... - https://man.mtool.work/python/3.14/library/difflib.html
- site --- サイト固有の設定フック 10156
- site --- サイト固有の設定フック ソースコード: Lib/site.py このモジュールは初期化中に自動的にインポートされます。 自動インポートはインタプリタの -S オプションで禁止できます。 Importing this module normally appends site-specific paths to the
...o check is made that the item refers to a directory rather than a file. No item is added to sys.path more than once. Blank lines and lines beginning with # are skipped. Lines starting with import (followed by space or tab) are executed. 注釈 An execut...dule is actually going to be used. Its impact should thus be kept to a minimum. The primary intended purpose of executable lines is to make the corresponding module(s) importable (load 3rd-party import hooks, adjust PATH etc). Any other initialization... - https://man.mtool.work/python/3.14/library/site.html
- textwrap --- テキストの折り返しと詰め込み 9905
- textwrap --- テキストの折り返しと詰め込み ソースコード: Lib/textwrap.py textwrap モジュールは、実際の処理をすべて担う TextWrapper クラスと、いくつかの便利な関数を提供します。 1 つか 2 つの文字列を折り返したり詰め込んだりするだけなら、これら
..._sentence_endings = False , break_long_words = True , drop_whitespace = True , break_on_hyphens = True , tabsize = 8 , max_lines = None , placeholder = ' [...]' ) text (文字列) に含まれる 1 つの段落を、各行が最大 width 文字になるように折り返します。 行..._sentence_endings = False , break_long_words = True , drop_whitespace = True , break_on_hyphens = True , tabsize = 8 , max_lines = None , placeholder = ' [...]' ) text に含まれる 1 つの段落を折り返し、折り返した段落を 1 つの文字列として返します。 fill...ap. indent ( text , prefix , predicate = None ) text の中の選択された行の先頭に prefix を追加します。 行の分割は text.splitlines(True) で行います。 デフォルトでは、(改行文字を含む)空白文字だけの行を除いてすべての行に prefix を追加します。 例えば: >>>... - https://man.mtool.work/python/3.14/library/textwrap.html
- 10. 標準ライブラリをひとめぐり 9905
- 10. 標準ライブラリをひとめぐり 10.1. オペレーティングシステムとのインターフェース os モジュールは、オペレーティングシステムと対話するための多くの関数を提供しています: >>> import os >>> os . getcwd () # Return the current working directory '
...指定する表示行数を取り出します。 import argparse parser = argparse . ArgumentParser ( prog = 'top' , description = 'Show top lines from each file' ) parser . add_argument ( 'filenames' , nargs = '+' ) parser . add_argument ( '-l' , '--lines' , type = in...t , default = 10 ) args = parser . parse_args () print ( args ) コマンドラインで python top.py --lines=5 alpha.txt beta.txt を実行すると、上のスクリプトは args.lines を 5 、 args.filenames を ['alpha.txt', 'beta.txt'] に設定し... - https://man.mtool.work/python/3.14/tutorial/stdlib.html
- email.generator: MIME 文書の生成 9653
- email.generator : MIME 文書の生成 ソースコード: Lib/email/generator.py メッセージオブジェクトの構造で表された電子メールメッセージから、フラットな (直列化された) 表現を生成することは、よく行う処理の一つです。 smtplib.SMTP.sendmail() で送信し
...ます ( mailbox と WHY THE CONTENT-LENGTH FORMAT IS BAD を参照してください)。 If maxheaderlen is not None , refold any header lines that are longer than maxheaderlen , or if 0 , do not rewrap any headers. If maxheaderlen is None (the default), wrap heade...rs and other message lines according to the policy settings. policy が指定されていれば、そのポリシーでメッセージの生成を制御します。 policy が None (...mangle_from_ と maxheaderlen 引数のデフォルトの動作が、ポリシーに従うようになりました。 flatten ( msg , unixfrom = False , linesep = None ) msg を基点とするメッセージオブジェクト構造体の文字表現を出力します。出力先のファイルにはこの BytesGenerator イン... - https://man.mtool.work/python/3.14/library/email.generator.html
- The Python Profilers 9653
- The Python Profilers Source code: Lib/profile.py and Lib/pstats.py Introduction to the profilers cProfile and profile provide deterministic profiling of Python programs. A profile is a set of statistics that describes how often and for how
...print_stats ( 10 ) This sorts the profile by cumulative time in a function, and then only prints the ten most significant lines. If you want to understand what algorithms are taking time, the above line is what you would use. If you were looking to s...final example, you could try: p . sort_stats ( SortKey . TIME , SortKey . CUMULATIVE ) . print_stats ( .5 , 'init' ) This line sorts statistics with a primary key of time, and a secondary key of cumulative time, and then prints out some of the statis...tics. To be specific, the list is first culled down to 50% (re: .5 ) of its original size, then only lines containing init are maintained, and that sub-sub-list is printed. If you wondered what functions called the above function... - https://man.mtool.work/python/3.14/library/profile.html
- urllib.robotparser --- robots.txt 用のパーサー 9653
- urllib.robotparser --- robots.txt 用のパーサー ソースコード: Lib/urllib/robotparser.py このモジュールは、 robots.txt ファイルを公開しているウェブサイトから、特定のユーザーエージェントが URL を取得してよいかどうかを判定するクラス RobotFilePa
...) robots.txt ファイルを参照するための URL を設定します。 read ( ) robots.txt URL を読み出し、パーザに入力します。 parse ( lines ) 引数 lines の内容を解釈します。 can_fetch ( useragent , url ) 解釈された robots.txt ファイル中に記載された規則に従ったと... - https://man.mtool.work/python/3.14/library/urllib.robotparser.html
- tokenize --- Python ソース用のトークナイザー 9151
- tokenize --- Python ソース用のトークナイザー ソースコード: Lib/tokenize.py The tokenize module provides a lexical scanner for Python source code, implemented in Python. The scanner in this module returns comments as tokens as well, making i
...ifying the exclusive end position of the token. Rows are numbered from 1 and columns from 0. For a token spanning multiple lines, erow is the final row and ecol is the column on that row. For example, the name spam at the beginning of the first line h...on which the token was found, including surrounding text and the line terminator if present. For a token spanning multiple lines, this can contain several source lines. It is empty for ENCODING and ENDMARKER tokens. exact_type An integer identifying t... - https://man.mtool.work/python/3.14/library/tokenize.html