per page, with , order by , clip by
Results of 1 - 10 of about 63 for StringIO (0.007 sec.)
io --- ストリームを扱うコアツール — Python 3.14.8 ドキュメント 12588
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 汎用オペレーティングシステムサービス » io --- ストリームを扱うコアツール テーマ 自動 ライト ダーク | io --- ストリームを扱うコアツー ... は、オプションでエンコーディングを指定して、 open() を利用することです: f = open ( "myfile.txt" , "r" , encoding = "utf-8" ) StringIO オブジェクトはインメモリーのテキストストリームです: f = io . StringIO ( "some initial text data" ) 注釈 When working with ... 、バッファリングされた生のストリーム ( BufferedIOBase ) に対するバッファリングされたテキストのインターフェースです。最後に、 StringIO はメモリ上のテキストデータに対するストリームです。 引数名は規約に含まれていません。 そして open() の引数だけがキーワード引 ... IOBase から分離して返します。 根底のバッファが取り外された後、 TextIOBase は使用不能状態になります。 TextIOBase 実装には、 StringIO など、根底のバッファという概念を持たないものがあります。これらを呼び出すと UnsupportedOperation を送出します。 Added in ve ...
https://man.mtool.work/python/3.14/library/io.html
io --- ストリームを扱うコアツール — Python 3.14.8 ドキュメント 12588
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 汎用オペレーティングシステムサービス » io --- ストリームを扱うコアツール テーマ 自動 ライト ダーク | io --- ストリームを扱うコアツー ... は、オプションでエンコーディングを指定して、 open() を利用することです: f = open ( "myfile.txt" , "r" , encoding = "utf-8" ) StringIO オブジェクトはインメモリーのテキストストリームです: f = io . StringIO ( "some initial text data" ) 注釈 When working with ... 、バッファリングされた生のストリーム ( BufferedIOBase ) に対するバッファリングされたテキストのインターフェースです。最後に、 StringIO はメモリ上のテキストデータに対するストリームです。 引数名は規約に含まれていません。 そして open() の引数だけがキーワード引 ... IOBase から分離して返します。 根底のバッファが取り外された後、 TextIOBase は使用不能状態になります。 TextIOBase 実装には、 StringIO など、根底のバッファという概念を持たないものがあります。これらを呼び出すと UnsupportedOperation を送出します。 Added in ve ...
https://man.mtool.work/python/3.14/library/io.html
json --- JSON エンコーダーとデコーダー — Python 3.14.8 ドキュメント 10946
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » インターネット上のデータの操作 » json --- JSON エンコーダーとデコーダー テーマ 自動 ライト ダーク | json --- JSON エンコーダーとデコ ... >>> print ( json . dumps ({ "c" : 0 , "b" : 0 , "a" : 0 }, sort_keys = True )) {"a": 0, "b": 0, "c": 0} >>> from io import StringIO >>> io = StringIO () >>> json . dump ([ 'streaming API' ], io ) >>> io . getvalue () '["streaming API"]' コンパクトなエンコ ... , 2]}]' ) ['foo', {'bar': ['baz', None, 1.0, 2]}] >>> json . loads ( '" \\ "foo \\ bar"' ) '"foo\x08ar' >>> from io import StringIO >>> io = StringIO ( '["streaming API"]' ) >>> json . load ( io ) ['streaming API'] JSON オブジェクトのデコーディング方法を ... omplex return dictionary print sort custom real imag used 注釈 separators TypeError loads hook circular JavaScript objects StringIO 目次 json --- JSON エンコーダーとデコーダー 基本的な使い方 エンコーダとデコーダ 例外 標準への準拠と互換性 文字エンコーディ ...
https://man.mtool.work/python/3.14/library/json.html
json --- JSON エンコーダーとデコーダー — Python 3.14.8 ドキュメント 9708
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » インターネット上のデータの操作 » json --- JSON エンコーダーとデコーダー テーマ 自動 ライト ダーク | json --- JSON エンコーダーとデコ ... >>> print ( json . dumps ({ "c" : 0 , "b" : 0 , "a" : 0 }, sort_keys = True )) {"a": 0, "b": 0, "c": 0} >>> from io import StringIO >>> io = StringIO () >>> json . dump ([ 'streaming API' ], io ) >>> io . getvalue () '["streaming API"]' コンパクトなエンコ ... , 2]}]' ) ['foo', {'bar': ['baz', None, 1.0, 2]}] >>> json . loads ( '" \\ "foo \\ bar"' ) '"foo\x08ar' >>> from io import StringIO >>> io = StringIO ( '["streaming API"]' ) >>> json . load ( io ) ['streaming API'] JSON オブジェクトのデコーディング方法を ...
https://man.mtool.work/python/3.14/library/json.html
contextlib --- with 文コンテキスト用ユーティリティ — Python 3.14.8 ドキュメント 9290
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » contextlib --- with 文コンテキスト用ユーティリティ テーマ 自動 ライト ダーク | contextlib --- with 文コ ... tput of help() normally is sent to sys.stdout . You can capture that output in a string by redirecting the output to an io.StringIO object. The replacement stream is returned from the __enter__() method and so is available as the target of the with state ... ment: with redirect_stdout ( io . StringIO ()) as f : help ( pow ) s = f . getvalue () help() の出力をディスク上のファイルに送るためには、出力を通常のファイルにリダイ ... ラントです。以下はリエントラントな利用法の非常に単純な例です: >>> from contextlib import redirect_stdout >>> from io import StringIO >>> stream = StringIO () >>> write_to_stream = redirect_stdout ( stream ) >>> with write_to_stream : ... print ( "This is ...
https://man.mtool.work/python/3.14/library/contextlib.html
contextlib --- with 文コンテキスト用ユーティリティ — Python 3.14.8 ドキュメント 9290
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » contextlib --- with 文コンテキスト用ユーティリティ テーマ 自動 ライト ダーク | contextlib --- with 文コ ... tput of help() normally is sent to sys.stdout . You can capture that output in a string by redirecting the output to an io.StringIO object. The replacement stream is returned from the __enter__() method and so is available as the target of the with state ... ment: with redirect_stdout ( io . StringIO ()) as f : help ( pow ) s = f . getvalue () help() の出力をディスク上のファイルに送るためには、出力を通常のファイルにリダイ ... ラントです。以下はリエントラントな利用法の非常に単純な例です: >>> from contextlib import redirect_stdout >>> from io import StringIO >>> stream = StringIO () >>> write_to_stream = redirect_stdout ( stream ) >>> with write_to_stream : ... print ( "This is ...
https://man.mtool.work/python/3.14/library/contextlib.html
拡張と埋め込み FAQ — Python 3.14.8 ドキュメント 8469
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python よくある質問 » 拡張と埋め込み FAQ テーマ 自動 ライト ダーク | 拡張と埋め込み FAQ ¶ C で独自の関数を作ることはできますか? ¶ はい。関数、変数、例外、そして新 ... に標準のトレースバック機構を作動させてください。そうすれば、出力は write() が送る任意の所に行きます。 最も簡単な方法は、 io.StringIO クラスを使うことです: >>> import io , sys >>> sys . stdout = io . StringIO () >>> print ( 'foo' ) >>> print ( 'hello world ...
https://man.mtool.work/python/3.14/faq/extending.html
wsgiref --- WSGI ユーティリティとリファレンス実装 — Python 3.14.8 ドキュメント 8469
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » インターネットプロトコルとサポート » wsgiref --- WSGI ユーティリティとリファレンス実装 テーマ 自動 ライト ダーク | wsgiref --- WSGI ... e() メソッドを持ち、これが呼ばれた場合には filelike オブジェクトの close() メソッドを呼び出します。 使用例: from io import StringIO from wsgiref.util import FileWrapper # We're using a StringIO-buffer for as the file-like object filelike = StringIO ( "Th ...
https://man.mtool.work/python/3.14/library/wsgiref.html
拡張と埋め込み FAQ — Python 3.14.8 ドキュメント 8469
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python よくある質問 » 拡張と埋め込み FAQ テーマ 自動 ライト ダーク | 拡張と埋め込み FAQ ¶ C で独自の関数を作ることはできますか? ¶ はい。関数、変数、例外、そして新 ... に標準のトレースバック機構を作動させてください。そうすれば、出力は write() が送る任意の所に行きます。 最も簡単な方法は、 io.StringIO クラスを使うことです: >>> import io , sys >>> sys . stdout = io . StringIO () >>> print ( 'foo' ) >>> print ( 'hello world ...
https://man.mtool.work/python/3.14/faq/extending.html
wsgiref --- WSGI ユーティリティとリファレンス実装 — Python 3.14.8 ドキュメント 8469
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » インターネットプロトコルとサポート » wsgiref --- WSGI ユーティリティとリファレンス実装 テーマ 自動 ライト ダーク | wsgiref --- WSGI ... e() メソッドを持ち、これが呼ばれた場合には filelike オブジェクトの close() メソッドを呼び出します。 使用例: from io import StringIO from wsgiref.util import FileWrapper # We're using a StringIO-buffer for as the file-like object filelike = StringIO ( "Th ...
https://man.mtool.work/python/3.14/library/wsgiref.html
PREV 1 2 3 4 5 6 7 NEXT