per page, with , order by , clip by
Results of 1 - 10 of about 333 for main (0.010 sec.)
__main__ --- トップレベルのコード環境 — Python 3.14.8 ドキュメント 10810
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » __main__ --- トップレベルのコード環境 テーマ 自動 ライト ダーク | __main__ --- トップレベルのコード環境 ... ¶ Python では、 __main__ という特別な名前が次の二つの重要な用途で使われます: プログラムのトップレベル環境の名前。 __name__ == '__main__' という式 ... でチェックすることができる。 Python パッケージにおける __main__.py ファイル。 どちらも Python のモジュールに関わる機能です。 1つ目はユーザーがどうモジュールを使うか、2つ目はモジュールと ... ます。 詳細は以下で説明します。 Python モジュールがどういうものかについては、 モジュール を参照してください。 __name__ == '__main__' ¶ Python モジュールやパッケージがインポートされるとき、 __name__ の値はそのモジュールの名前となります。 通常、インポート ...
https://man.mtool.work/python/3.14/library/__main__.html
__main__ --- トップレベルのコード環境 — Python 3.14.8 ドキュメント 10810
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » __main__ --- トップレベルのコード環境 テーマ 自動 ライト ダーク | __main__ --- トップレベルのコード環境 ... ¶ Python では、 __main__ という特別な名前が次の二つの重要な用途で使われます: プログラムのトップレベル環境の名前。 __name__ == '__main__' という式 ... でチェックすることができる。 Python パッケージにおける __main__.py ファイル。 どちらも Python のモジュールに関わる機能です。 1つ目はユーザーがどうモジュールを使うか、2つ目はモジュールと ... ます。 詳細は以下で説明します。 Python モジュールがどういうものかについては、 モジュール を参照してください。 __name__ == '__main__' ¶ Python モジュールやパッケージがインポートされるとき、 __name__ の値はそのモジュールの名前となります。 通常、インポート ...
https://man.mtool.work/python/3.14/library/__main__.html
Logging クックブック — Python 3.14.8 ドキュメント 8500
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » Logging クックブック テーマ 自動 ライト ダーク | Logging クックブック ¶ Author : Vinay Sajip <vinay_sajip at red-dove dot com> このページは、過去に ... le.some_function() 複数のスレッドからのロギング ¶ 複数スレッドからのロギングでは特別に何かをする必要はありません。 次の例はmain (初期) スレッドとそれ以外のスレッドからのロギングの例です: import logging import threading import time def worker ( arg ): ... while not arg [ 'stop' ]: logging . debug ( 'Hi from myfunc' ) time . sleep ( 0.5 ) def main (): logging . basicConfig ( level = logging . DEBUG , format = ' %(relativeCreated)6d %(threadName)s %(message)s ' ) info ... hreading . Thread ( target = worker , args = ( info ,)) thread . start () while True : try : logging . debug ( 'Hello from main' ) time . sleep ( 0.75 ) except KeyboardInterrupt : info [ 'stop' ] = True break thread . join () if __name__ == '__main__ ...
https://man.mtool.work/python/3.14/howto/logging-cookbook.html
Logging クックブック — Python 3.14.8 ドキュメント 8007
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » Logging クックブック テーマ 自動 ライト ダーク | Logging クックブック ¶ Author : Vinay Sajip <vinay_sajip at red-dove dot com> このページは、過去に ... le.some_function() 複数のスレッドからのロギング ¶ 複数スレッドからのロギングでは特別に何かをする必要はありません。 次の例はmain (初期) スレッドとそれ以外のスレッドからのロギングの例です: import logging import threading import time def worker ( arg ): ... while not arg [ 'stop' ]: logging . debug ( 'Hi from myfunc' ) time . sleep ( 0.5 ) def main (): logging . basicConfig ( level = logging . DEBUG , format = ' %(relativeCreated)6d %(threadName)s %(message)s ' ) info ... hreading . Thread ( target = worker , args = ( info ,)) thread . start () while True : try : logging . debug ( 'Hello from main' ) time . sleep ( 0.75 ) except KeyboardInterrupt : info [ 'stop' ] = True break thread . join () if __name__ == '__main__ ...
https://man.mtool.work/python/3.14/howto/logging-cookbook.html
Coroutines and tasks — Python 3.14.8 ドキュメント 7523
ナビゲーション 索引 モジュール | 次へ | 前へ | 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 単 ... にコルーチンを呼び出しただけでは、コルーチンの実行スケジュールは予約されていないことに注意してください: >>> main () <coroutine object main at 0x1053bb7c8> 実際にコルーチンを実行するために、asyncio は以下のメカニズムを提供しています: 最 ... 上位のエントリーポイントである "main()" 関数を実行する asyncio.run() 関数 (上の例を参照してください。) コルーチンを await すること。次のコード片は 1 秒間待機し ...
https://man.mtool.work/python/3.14/library/asyncio-task.html
Coroutines and tasks — Python 3.14.8 ドキュメント 7523
ナビゲーション 索引 モジュール | 次へ | 前へ | 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 単 ... にコルーチンを呼び出しただけでは、コルーチンの実行スケジュールは予約されていないことに注意してください: >>> main () <coroutine object main at 0x1053bb7c8> 実際にコルーチンを実行するために、asyncio は以下のメカニズムを提供しています: 最 ... 上位のエントリーポイントである "main()" 関数を実行する asyncio.run() 関数 (上の例を参照してください。) コルーチンを await すること。次のコード片は 1 秒間待機し ...
https://man.mtool.work/python/3.14/library/asyncio-task.html
A Conceptual Overview of asyncio — Python 3.14.8 ドキュメント 7112
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » A Conceptual Overview of asyncio テーマ 自動 ライト ダーク | A Conceptual Overview of asyncio ¶ This HOWTO article seeks to help you build a sturd ... es by A. Jesse Jiryu Davis and Guido van Rossum. A conceptual overview part 1: the high-level ¶ In part 1, we'll cover the main, high-level building blocks of asyncio : the event loop, coroutine functions, coroutine objects, tasks, and await . Event ... rator ) Hello 7 Task ¶ Roughly speaking, tasks are coroutines (not coroutine functions) tied to an event loop. A task also maintains a list of callback functions whose importance will become clear in a moment when we discuss await . The recommended w ... provided coroutine finishes before advancing. For example, many async programs follow this setup: import asyncio async def main (): # Perform all sorts of wacky, wild asynchronous things... ... if __name__ == "__main__" : asyncio . run ( main ()) # T ...
https://man.mtool.work/python/3.14/howto/a-conceptual-overview-of-asyncio.html
A Conceptual Overview of asyncio — Python 3.14.8 ドキュメント 7112
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » A Conceptual Overview of asyncio テーマ 自動 ライト ダーク | A Conceptual Overview of asyncio ¶ This HOWTO article seeks to help you build a sturd ... es by A. Jesse Jiryu Davis and Guido van Rossum. A conceptual overview part 1: the high-level ¶ In part 1, we'll cover the main, high-level building blocks of asyncio : the event loop, coroutine functions, coroutine objects, tasks, and await . Event ... rator ) Hello 7 Task ¶ Roughly speaking, tasks are coroutines (not coroutine functions) tied to an event loop. A task also maintains a list of callback functions whose importance will become clear in a moment when we discuss await . The recommended w ... provided coroutine finishes before advancing. For example, many async programs follow this setup: import asyncio async def main (): # Perform all sorts of wacky, wild asynchronous things... ... if __name__ == "__main__" : asyncio . run ( main ()) # T ...
https://man.mtool.work/python/3.14/howto/a-conceptual-overview-of-asyncio.html
runpy --- Python モジュールの位置特定と実行 — Python 3.14.8 ドキュメント 6829
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » モジュールのインポート » runpy --- Python モジュールの位置特定と実行 テーマ 自動 ライト ダーク | runpy --- Python モジュールの位置特 ... 行 ¶ ソースコード: Lib/runpy.py The runpy module is used to locate and run Python modules without importing them first. Its main use is to implement the -m command line switch that allows scripts to be located using the Python module namespace rather ... e module name. If the module name refers to a package rather than a normal module, then that package is imported and the __main__ submodule within that package is then executed and the resulting module globals dictionary returned. The optional dictio ... t: None でない場合は run_name に設定されます。 run_name が None である場合、 mod_name がパッケージであれば``mod_name + '.__main__'`` に、それ以外では mod_name に設定されます。 __spec__ will be set appropriately for the actually imported module (that ...
https://man.mtool.work/python/3.14/library/runpy.html
runpy --- Python モジュールの位置特定と実行 — Python 3.14.8 ドキュメント 6829
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » モジュールのインポート » runpy --- Python モジュールの位置特定と実行 テーマ 自動 ライト ダーク | runpy --- Python モジュールの位置特 ... 行 ¶ ソースコード: Lib/runpy.py The runpy module is used to locate and run Python modules without importing them first. Its main use is to implement the -m command line switch that allows scripts to be located using the Python module namespace rather ... e module name. If the module name refers to a package rather than a normal module, then that package is imported and the __main__ submodule within that package is then executed and the resulting module globals dictionary returned. The optional dictio ... t: None でない場合は run_name に設定されます。 run_name が None である場合、 mod_name がパッケージであれば``mod_name + '.__main__'`` に、それ以外では mod_name に設定されます。 __spec__ will be set appropriately for the actually imported module (that ...
https://man.mtool.work/python/3.14/library/runpy.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT