Results of 1 - 10 of about 14 for textwrap (0.008 sec.)
- textwrap --- テキストの折り返しと詰め込み 14896
- textwrap --- テキストの折り返しと詰め込み ソースコード: Lib/textwrap.py textwrap モジュールは、実際の処理をすべて担う TextWrapper クラスと、いくつかの便利な関数を提供します。 1 つか 2 つの文字列を折り返したり詰め込んだりするだけなら、これら
...の関数で十分でしょう。 それ以外の場合は、効率のために TextWrapper のインスタンスを使ってください。 textwrap. wrap ( text , width = 70 , * , initial_indent = '' , subsequent_indent = ''...字になるように折り返します。 行末に改行文字を含まない出力行のリストを返します。 オプションのキーワード引数は、以下で説明する TextWrapper のインスタンス属性に対応しています。 wrap() の動作についての詳細は TextWrapper.wrap() メソッドを参照してください。 text...たものです。 " \n " . join ( wrap ( text , ... )) 特に、 fill() は wrap() とまったく同じ名前のキーワード引数を受け取ります。 textwrap. shorten ( text , width , * , fix_sentence_endings = False , break_long_words = True , break_on_hyphens = True , placehold... - https://man.mtool.work/python/3.14/library/textwrap.html
- 11. 標準ライブラリをひとめぐり --- その II 9190
- 11. 標準ライブラリをひとめぐり --- その II ツアーの第2部では、プロフェッショナルプログラミングを支えるもっと高度なモジュールをカバーします。ここで挙げるモジュールは、小さなスクリプトの開発ではほとんど使いません。 11.1. 出力のフォーマット re
...>>> pprint . pprint ( t , width = 30 ) [[[['black', 'cyan'], 'white', ['green', 'red']], [['magenta', 'yellow'], 'blue']]] textwrap モジュールは、段落で構成された文章を、指定したスクリーン幅にぴったり収まるように調整します: >>> import textwrap >>> doc =...eturns ... a list of strings instead of one big string with newlines to separate ... the wrapped lines.""" ... >>> print ( textwrap . fill ( doc , width = 40 )) The wrap() method is just like fill() except that it returns a list of strings instead of one... - https://man.mtool.work/python/3.14/tutorial/stdlib2.html
- テキスト処理サービス 9050
- テキスト処理サービス この章で説明するモジュールは幅広い文字列操作や様々なテキスト処理サービスを提供しています。 バイナリデータ処理 で説明する codecs モジュールも、テキスト処理と深く関係しています。 Python の組み込み文字列型については テキス
...数 SequenceMatcher オブジェクト 使用例 SequenceMatcher の例 Differ の例 difflib のコマンドラインインターフェース ndiff の例 textwrap --- テキストの折り返しと詰め込み unicodedata --- Unicode データベース stringprep --- インターネットの文字列調製 readline -... - https://man.mtool.work/python/3.14/library/text.html
- What's New in Python 2.3 8454
- What's New in Python 2.3 著者 : A.M. Kuchling この文書は Python 2.3 の新機能について解説します。Python 2.3 は 2003 年 7 月 29 日にリリースされました。 Python 2.3 の主要なテーマは、2.2 で追加されたいくつかの機能を磨くこと、言語中核に小さいな
...できます。 新モジュール tarfile で tar 形式のアーカイブファイルの読み書きが出来ます。 (Contributed by Lars Gustäbel.) 新しい textwrap モジュールには、テキストの段落を含む文字列を折り返す関数が含まれています。 wrap(text, width) 関数は文字列を受け取り、指定し...た一つの文字列を返します。 (想像のとおり、 fill() は wrap() をもとに作られています。) 例えば次のようになります。 >>> import textwrap >>> paragraph = "Not a whit, we defy augury: ... more text ..." >>> textwrap . wrap ( paragraph , 60 ) ["Not a whit, we de...y augury: there's a special providence in", "the fall of a sparrow. If it be now, 'tis not to come; if it", ...] >>> print textwrap . fill ( paragraph , 35 ) Not a whit, we defy augury: there's a special providence in the fall of a sparrow. If it be now,... - https://man.mtool.work/python/3.14/whatsnew/2.3.html
- Python ドキュメントの目次 8314
- Python ドキュメントの目次 What's New in Python What's new in Python 3.14 概要 -- リリースハイライト 新しい機能 PEP 649 と PEP 749 : アノテーションの遅延評価 PEP 734 : 複数インタープリタ機能が標準ライブラリに追加 PEP 750 : テンプレート文字列
...urtle types typing unicodedata unittest urllib uuid webbrowser zipfile 最適化 asyncio base64 bdb difflib gc io pathlib pdb textwrap uuid zlib 削除 argparse ast asyncio email importlib.abc itertools pathlib pkgutil pty sqlite3 urllib 非推奨 新たな非推奨事...print pty pydoc re resource select shelve shutil smtpd smtplib socket sqlite3 ssl stat struct subprocess sunau sys tarfile textwrap threading traceback types urllib unittest venv wave weakref xml.etree zipfile CPython の実装の変更 PEP 445: CPython のメモ...sched select shlex shutil signal smtpd smtplib socket socketserver sqlite3 ssl stat struct subprocess sys tarfile tempfile textwrap threading time types unittest urllib webbrowser xml.etree.ElementTree zlib 最適化 ビルドならびに C API の変更 非推奨 サポー... - https://man.mtool.work/python/3.14/contents.html
- Pythonモジュール索引 8314
- Pythonモジュール索引 _ | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | z _ __future__ Future statement definitions __main__ The environment where top-level code is run. Covers command-line i
...tests. test.support.threading_helper Support for threading tests. test.support.warnings_helper Support for warnings tests. textwrap Text wrapping and filling threading Thread-based parallelism. time Time access and conversions. timeit Measure the executi... - https://man.mtool.work/python/3.14/py-modindex.html
- concurrent.interpreters --- 同じプロセス内の複数のインタープリタ 8174
- concurrent.interpreters --- 同じプロセス内の複数のインタープリタ Added in version 3.14. ソースコード: Lib/concurrent/interpreters concurrent.interpreters モジュールは、低水準の _interpreters モジュールの上に、より高水準のインターフェースを構
...() # 現在の OS スレッドで実行する interp . exec ( 'print("spam!")' ) interp . exec ( """if True: print('spam!') """ ) from textwrap import dedent interp . exec ( dedent ( """ print('spam!') """ )) def run ( arg ): return arg res = interp . call ( run , '... - https://man.mtool.work/python/3.14/library/concurrent.interpreters.html
- Python 標準ライブラリ 8174
- Python 標準ライブラリ このライブラリリファレンスマニュアルは、Python に付属する標準ライブラリについて説明します。 Python の配布物に含まれることが多い、オプションのコンポーネントの一部も説明します。 別の文書である Python 言語リファレンス では
...的な文字列操作 string.templatelib --- テンプレート文字列リテラルのサポート re --- 正規表現操作 difflib --- 差分の計算の補助 textwrap --- テキストの折り返しと詰め込み unicodedata --- Unicode データベース stringprep --- インターネットの文字列調製 readline -... - https://man.mtool.work/python/3.14/library/
- What's New in Python 2.6 8174
- What's New in Python 2.6 著者 : A.M. Kuchling (amk at amk.ca) この記事では、2008 年 10 月 1 日にリリースされた Python 2.6 の新機能を説明します。 リリース日程は PEP 361 に記載されています。 Python 2.6 の主要なテーマは、言語を大幅に再設計する
...== "function is outdated" assert len ( wrec . warnings ) == 1 , "Multiple warnings raised" (Contributed by Brett Cannon.) textwrap に drop_whitespace=False を渡すと、新しく作る行の先頭と末尾にある既存の空白を保持できるようになりました。 >>> S = """This...sentence has a bunch of ... extra whitespace.""" >>> print textwrap . fill ( S , width = 15 ) This sentence has a bunch of extra whitespace. >>> print textwrap . fill ( S , drop_whitespace =... - https://man.mtool.work/python/3.14/whatsnew/2.6.html
- What's new in Python 3.14 8017
- What's new in Python 3.14 エディタ : Adam Turner と Hugo van Kemenade この記事では Python 3.13 と比較した Python 3.14 の新機能を解説します。Python 3.14 は2025年10月7日にリリースされました。全詳細については 変更履歴 をご覧ください。 参考 PEP
...command-line option -c now automatically dedents its code argument before execution. The auto-dedentation behavior mirrors textwrap.dedent() . (Contributed by Jon Crall and Steven Sun in gh-103998 .) -J は Jython 用に予約されたフラグではなくなり、特別な意...合、デフォルトでは sys.settrace() バックエンドが使われますが、設定で変更できます。 (Tian Gao が gh-124533 で貢献しました。) textwrap dedent() 関数を最適化し、平均で 2.4 倍高速化しました。 入力が大きいほど改善の幅も大きくなります。 また、スペースとタブ以外... - https://man.mtool.work/python/3.14/whatsnew/3.14.html