Results of 1 - 10 of about 111 for world (0.005 sec.)
- textwrap --- テキストの折り返しと詰め込み — Python 3.14.8 ドキュメント 11529
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » テキスト処理サービス » textwrap --- テキストの折り返しと詰め込み テーマ 自動 ライト ダーク | textwrap --- テキストの折り返しと詰め込
...残りの文字数と placeholder との和が width 内に収まるように、末尾から単語が切り捨てられます: >>> textwrap . shorten ( "Hello world!" , width = 12 ) 'Hello world!' >>> textwrap . shorten ( "Hello world!" , width = 11 ) 'Hello [...]' >>> textwrap . shorte...n ( "Hello world" , width = 10 , placeholder = "..." ) 'Hello...' オプションのキーワード引数は、以下で説明する TextWrapper インスタンスの属...の際に単一の改行文字に正規化されます。 例えば: def test (): # end first line with \ to avoid the empty line! s = ''' \ hello world ''' print ( repr ( s )) # prints ' hello\n world\n ' print ( repr ( dedent ( s ))) # prints 'hello\n world\n' バージョン 3... - https://man.mtool.work/python/3.14/library/textwrap.html
- textwrap --- テキストの折り返しと詰め込み — Python 3.14.8 ドキュメント 11529
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » テキスト処理サービス » textwrap --- テキストの折り返しと詰め込み テーマ 自動 ライト ダーク | textwrap --- テキストの折り返しと詰め込
...残りの文字数と placeholder との和が width 内に収まるように、末尾から単語が切り捨てられます: >>> textwrap . shorten ( "Hello world!" , width = 12 ) 'Hello world!' >>> textwrap . shorten ( "Hello world!" , width = 11 ) 'Hello [...]' >>> textwrap . shorte...n ( "Hello world" , width = 10 , placeholder = "..." ) 'Hello...' オプションのキーワード引数は、以下で説明する TextWrapper インスタンスの属...の際に単一の改行文字に正規化されます。 例えば: def test (): # end first line with \ to avoid the empty line! s = ''' \ hello world ''' print ( repr ( s )) # prints ' hello\n world\n ' print ( repr ( dedent ( s ))) # prints 'hello\n world\n' バージョン 3... - https://man.mtool.work/python/3.14/library/textwrap.html
- functools --- 高階関数と呼び出し可能オブジェクトの操作 — Python 3.14.8 ドキュメ... 9616
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 関数型プログラミング用モジュール » functools --- 高階関数と呼び出し可能オブジェクトの操作 テーマ 自動 ライト ダーク | functools ---
...itional arguments can be pre-filled. If any Placeholder sentinels are present, all must be filled at call time: >>> say_to_world = partial ( print , Placeholder , Placeholder , "world!" ) >>> say_to_world ( 'Hello' , 'dear' ) Hello dear world! Calling...say_to_world('Hello') raises a TypeError , because only one positional argument is provided, but there are two placeholders that must b...ools import partial , Placeholder as _ >>> remove = partial ( str . replace , _ , _ , '' ) >>> message = 'Hello, dear dear world!' >>> remove ( message , ' dear' ) 'Hello, world!' >>> remove_dear = partial ( remove , _ , ' dear' ) >>> remove_dear ( me... - https://man.mtool.work/python/3.14/library/functools.html
- functools --- 高階関数と呼び出し可能オブジェクトの操作 — Python 3.14.8 ドキュメ... 9616
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 関数型プログラミング用モジュール » functools --- 高階関数と呼び出し可能オブジェクトの操作 テーマ 自動 ライト ダーク | functools ---
...itional arguments can be pre-filled. If any Placeholder sentinels are present, all must be filled at call time: >>> say_to_world = partial ( print , Placeholder , Placeholder , "world!" ) >>> say_to_world ( 'Hello' , 'dear' ) Hello dear world! Calling...say_to_world('Hello') raises a TypeError , because only one positional argument is provided, but there are two placeholders that must b...ools import partial , Placeholder as _ >>> remove = partial ( str . replace , _ , _ , '' ) >>> message = 'Hello, dear dear world!' >>> remove ( message , ' dear' ) 'Hello, world!' >>> remove_dear = partial ( remove , _ , ' dear' ) >>> remove_dear ( me... - https://man.mtool.work/python/3.14/library/functools.html
- socketserver --- ネットワークサーバーのフレームワーク — Python 3.14.8 ドキュメ... 9477
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » インターネットプロトコルとサポート » socketserver --- ネットワークサーバーのフレームワーク テーマ 自動 ライト ダーク | socketserver
...rint ( "Received:" , received ) この例の出力は次のようになります: サーバー: $ python TCPServer.py 127.0.0.1 wrote: b'hello world with TCP' 127.0.0.1 wrote: b'python is nice' クライアント: $ python TCPClient.py hello world with TCP Sent: hello world wi...th TCP Received: HELLO WORLD WITH TCP $ python TCPClient.py python is nice Sent: python is nice Received: PYTHON IS NICE socketserver.UDPServer の例 ¶...rue server_thread . start () print ( "Server loop running in thread:" , server_thread . name ) client ( ip , port , "Hello World 1" ) client ( ip , port , "Hello World 2" ) client ( ip , port , "Hello World 3" ) server . shutdown () この例の出力は次の... - https://man.mtool.work/python/3.14/library/socketserver.html
- socketserver --- ネットワークサーバーのフレームワーク — Python 3.14.8 ドキュメ... 9477
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » インターネットプロトコルとサポート » socketserver --- ネットワークサーバーのフレームワーク テーマ 自動 ライト ダーク | socketserver
...rint ( "Received:" , received ) この例の出力は次のようになります: サーバー: $ python TCPServer.py 127.0.0.1 wrote: b'hello world with TCP' 127.0.0.1 wrote: b'python is nice' クライアント: $ python TCPClient.py hello world with TCP Sent: hello world wi...th TCP Received: HELLO WORLD WITH TCP $ python TCPClient.py python is nice Sent: python is nice Received: PYTHON IS NICE socketserver.UDPServer の例 ¶...rue server_thread . start () print ( "Server loop running in thread:" , server_thread . name ) client ( ip , port , "Hello World 1" ) client ( ip , port , "Hello World 2" ) client ( ip , port , "Hello World 3" ) server . shutdown () この例の出力は次の... - https://man.mtool.work/python/3.14/library/socketserver.html
- Coroutines and tasks — Python 3.14.8 ドキュメント 8590
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » Coroutines and tasks テーマ 自動 ライト ダーク | Coroutines and tasks ¶
...を使ったアプリケーションを書くのに推奨される方法です。例えば、次のコードスニペットは "hello" を出力し、そこから 1 秒待って "world" を出力します: >>> import asyncio >>> async def main (): ... print ( 'hello' ) ... await asyncio . sleep ( 1 ) ... print (...'world' ) >>> asyncio . run ( main ()) hello world 単にコルーチンを呼び出しただけでは、コルーチンの実行スケジュールは予約されてい...照してください。) コルーチンを await すること。次のコード片は 1 秒間待機した後に "hello" と出力し、 更に 2 秒間待機してから "world" と出力します: import asyncio import time async def say_after ( delay , what ): await asyncio . sleep ( delay ) print ( wh... - https://man.mtool.work/python/3.14/library/asyncio-task.html
- Coroutines and tasks — Python 3.14.8 ドキュメント 8590
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » asyncio --- 非同期 I/O » Coroutines and tasks テーマ 自動 ライト ダーク | Coroutines and tasks ¶
...を使ったアプリケーションを書くのに推奨される方法です。例えば、次のコードスニペットは "hello" を出力し、そこから 1 秒待って "world" を出力します: >>> import asyncio >>> async def main (): ... print ( 'hello' ) ... await asyncio . sleep ( 1 ) ... print (...'world' ) >>> asyncio . run ( main ()) hello world 単にコルーチンを呼び出しただけでは、コルーチンの実行スケジュールは予約されてい...照してください。) コルーチンを await すること。次のコード片は 1 秒間待機した後に "hello" と出力し、 更に 2 秒間待機してから "world" と出力します: import asyncio import time async def say_after ( delay , what ): await asyncio . sleep ( delay ) print ( wh... - https://man.mtool.work/python/3.14/library/asyncio-task.html
- tempfile --- 一時ファイルやディレクトリの作成 — Python 3.14.8 ドキュメント 8299
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ファイルとディレクトリへのアクセス » tempfile --- 一時ファイルやディレクトリの作成 テーマ 自動 ライト ダーク | tempfile --- 一時ファ
...empfile # create a temporary file and write some data to it >>> fp = tempfile . TemporaryFile () >>> fp . write ( b 'Hello world!' ) # read data from file >>> fp . seek ( 0 ) >>> fp . read () b'Hello world!' # close the file, it will be removed >>> fp...) # create a temporary file using a context manager >>> with tempfile . TemporaryFile () as fp : ... fp . write ( b 'Hello world!' ) ... fp . seek ( 0 ) ... fp . read () b'Hello world!' >>> # file is now closed and removed # create a temporary file us...o open the file again >>> with tempfile . NamedTemporaryFile ( delete_on_close = False ) as fp : ... fp . write ( b 'Hello world!' ) ... fp . close () ... # the file is closed, but not removed ... # open the file again by using its name ... with open... - https://man.mtool.work/python/3.14/library/tempfile.html
- tempfile --- 一時ファイルやディレクトリの作成 — Python 3.14.8 ドキュメント 8299
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ファイルとディレクトリへのアクセス » tempfile --- 一時ファイルやディレクトリの作成 テーマ 自動 ライト ダーク | tempfile --- 一時ファ
...empfile # create a temporary file and write some data to it >>> fp = tempfile . TemporaryFile () >>> fp . write ( b 'Hello world!' ) # read data from file >>> fp . seek ( 0 ) >>> fp . read () b'Hello world!' # close the file, it will be removed >>> fp...) # create a temporary file using a context manager >>> with tempfile . TemporaryFile () as fp : ... fp . write ( b 'Hello world!' ) ... fp . seek ( 0 ) ... fp . read () b'Hello world!' >>> # file is now closed and removed # create a temporary file us...o open the file again >>> with tempfile . NamedTemporaryFile ( delete_on_close = False ) as fp : ... fp . write ( b 'Hello world!' ) ... fp . close () ... # the file is closed, but not removed ... # open the file again by using its name ... with open... - https://man.mtool.work/python/3.14/library/tempfile.html