-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathasyncio-tools.po
More file actions
154 lines (132 loc) Β· 7.15 KB
/
Copy pathasyncio-tools.po
File metadata and controls
154 lines (132 loc) Β· 7.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# Persian translations for Python package.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# Automatically generated, 2026.
#
# Translators:
# Sepehr Rasouli <[email protected]>, 2026
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-08-26 03:59+0000\n"
"PO-Revision-Date: 2026-08-25 20:39+0330\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: fa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Command-line introspection tools"
msgstr ""
msgid "**Source code:** :source:`Lib/asyncio/tools.py`"
msgstr ""
msgid "The :mod:`!asyncio` module can be invoked as a script via ``python -m asyncio`` to inspect the task graph of another running Python process without modifying it or restarting it. The :mod:`!asyncio.tools` submodule implements this interface."
msgstr ""
msgid "The following commands inspect the process identified by ``PID``:"
msgstr ""
msgid ""
"$ python -m asyncio pstree PID\n"
"$ python -m asyncio ps PID"
msgstr ""
msgid "The commands read the target process state without executing any code in it. They are only available on supported platforms and may require permission to inspect another process. See the :ref:`permission requirements <permission-requirements>` for details."
msgstr ""
msgid ":ref:`asyncio-graph`"
msgstr ""
msgid "Programmatic APIs for inspecting the async call graph of a task or future in the current process."
msgstr ""
msgid "The command examples below use this program, which creates a task hierarchy suitable for inspection and prints its process ID:"
msgstr ""
msgid "example.py"
msgstr ""
msgid ""
"import asyncio\n"
"import os\n"
"\n"
"async def play(track):\n"
" await asyncio.sleep(3600)\n"
" print(f\"π΅ Finished: {track}\")\n"
"\n"
"async def album(name, tracks):\n"
" async with asyncio.TaskGroup() as tg:\n"
" for track in tracks:\n"
" tg.create_task(play(track), name=track)\n"
"\n"
"async def main():\n"
" print(f\"PID: {os.getpid()}\")\n"
" async with asyncio.TaskGroup() as tg:\n"
" tg.create_task(\n"
" album(\"Sundowning\", [\"TNDNBTG\", \"Levitate\"]),\n"
" name=\"Sundowning\",\n"
" )\n"
" tg.create_task(\n"
" album(\"TMBTE\", [\"DYWTYLM\", \"Aqua Regia\"]),\n"
" name=\"TMBTE\",\n"
" )\n"
"\n"
"asyncio.run(main())"
msgstr ""
msgid "Run the program in one terminal and leave it running:"
msgstr ""
msgid ""
"$ python example.py\n"
"PID: 12345"
msgstr ""
msgid "Then pass the printed process ID to the commands from another terminal. Thread IDs, task IDs, file paths, and line numbers vary between runs and source layouts."
msgstr ""
msgid "Command-line options"
msgstr ""
msgid "Display task and coroutine relationships as a tree. Each task is shown with its full coroutine stack, nested under the task (if any) that is awaiting it. This subcommand is useful for quickly identifying which branch of a task hierarchy is blocked and where in its coroutine stack execution has paused:"
msgstr ""
msgid ""
"$ python -m asyncio pstree 12345\n"
"βββ (T) Task-1\n"
" βββ main example.py:12\n"
" βββ TaskGroup.__aexit__ Lib/asyncio/taskgroups.py:75\n"
" βββ TaskGroup._aexit Lib/asyncio/taskgroups.py:124\n"
" βββ (T) Sundowning\n"
" β βββ album example.py:7\n"
" β βββ TaskGroup.__aexit__ Lib/asyncio/taskgroups.py:75\n"
" β βββ TaskGroup._aexit Lib/asyncio/taskgroups.py:124\n"
" β βββ (T) TNDNBTG\n"
" β β βββ play example.py:4\n"
" β β βββ sleep Lib/asyncio/tasks.py:702\n"
" β βββ (T) Levitate\n"
" β βββ play example.py:4\n"
" β βββ sleep Lib/asyncio/tasks.py:702\n"
" βββ (T) TMBTE\n"
" βββ album example.py:7\n"
" βββ TaskGroup.__aexit__ Lib/asyncio/taskgroups.py:75\n"
" βββ TaskGroup._aexit Lib/asyncio/taskgroups.py:124\n"
" βββ (T) DYWTYLM\n"
" β βββ play example.py:4\n"
" β βββ sleep Lib/asyncio/tasks.py:702\n"
" βββ (T) Aqua Regia\n"
" βββ play example.py:4\n"
" βββ sleep Lib/asyncio/tasks.py:702"
msgstr ""
msgid "If the await graph contains a cycle, ``pstree`` reports an error instead of printing a tree. A cycle in the await graph is unusual and typically indicates a programming error:"
msgstr ""
msgid ""
"$ python -m asyncio pstree 12345\n"
"ERROR: await-graph contains cycles - cannot print a tree!\n"
"\n"
"cycle: Task-2 β Task-3 β Task-2"
msgstr ""
msgid "Display a flat table of all pending tasks in the process *PID*. Each row shows the event-loop thread ID, task ID and name, coroutine stack, and the awaiting task's stack, name, and ID, if any."
msgstr ""
msgid "This subcommand prints all tasks regardless of whether the await graph contains cycles:"
msgstr ""
msgid ""
"$ python -m asyncio ps 12345\n"
"tid task id task name coroutine stack awaiter chain awaiter name awaiter id\n"
"------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n"
"18445801 0x10a456060 Task-1 TaskGroup._aexit -> TaskGroup.__aexit__ -> main 0x0\n"
"18445801 0x10a439f60 Sundowning TaskGroup._aexit -> TaskGroup.__aexit__ -> album TaskGroup._aexit -> TaskGroup.__aexit__ -> main Task-1 0x10a456060\n"
"18445801 0x10a439d70 TMBTE TaskGroup._aexit -> TaskGroup.__aexit__ -> album TaskGroup._aexit -> TaskGroup.__aexit__ -> main Task-1 0x10a456060\n"
"18445801 0x10a2a3a80 TNDNBTG sleep -> play TaskGroup._aexit -> TaskGroup.__aexit__ -> album Sundowning 0x10a439f60\n"
"18445801 0x10a2a38a0 Levitate sleep -> play TaskGroup._aexit -> TaskGroup.__aexit__ -> album Sundowning 0x10a439f60\n"
"18445801 0x10a2d7150 DYWTYLM sleep -> play TaskGroup._aexit -> TaskGroup.__aexit__ -> album TMBTE 0x10a439d70\n"
"18445801 0x10a6bdaa0 Aqua Regia sleep -> play TaskGroup._aexit -> TaskGroup.__aexit__ -> album TMBTE 0x10a439d70"
msgstr ""