@@ -61,6 +61,23 @@ msgid ""
61
61
"\n"
62
62
"asyncio.run(run('ls /zzz'))"
63
63
msgstr ""
64
+ "import asyncio\n"
65
+ "\n"
66
+ "async def run(cmd):\n"
67
+ " proc = await asyncio.create_subprocess_shell(\n"
68
+ " cmd,\n"
69
+ " stdout=asyncio.subprocess.PIPE,\n"
70
+ " stderr=asyncio.subprocess.PIPE)\n"
71
+ "\n"
72
+ " stdout, stderr = await proc.communicate()\n"
73
+ "\n"
74
+ " print(f'[{cmd!r} exited with {proc.returncode}]')\n"
75
+ " if stdout:\n"
76
+ " print(f'[stdout]\\ n{stdout.decode()}')\n"
77
+ " if stderr:\n"
78
+ " print(f'[stderr]\\ n{stderr.decode()}')\n"
79
+ "\n"
80
+ "asyncio.run(run('ls /zzz'))"
64
81
65
82
#: ../../library/asyncio-subprocess.rst:40
66
83
msgid "will print::"
@@ -72,6 +89,9 @@ msgid ""
72
89
"[stderr]\n"
73
90
"ls: /zzz: No such file or directory"
74
91
msgstr ""
92
+ "['ls /zzz' exited with 1]\n"
93
+ "[stderr]\n"
94
+ "ls: /zzz: No such file or directory"
75
95
76
96
#: ../../library/asyncio-subprocess.rst:46
77
97
msgid ""
@@ -93,6 +113,12 @@ msgid ""
93
113
"\n"
94
114
"asyncio.run(main())"
95
115
msgstr ""
116
+ "async def main():\n"
117
+ " await asyncio.gather(\n"
118
+ " run('ls /zzz'),\n"
119
+ " run('sleep 1; echo \" hello\" '))\n"
120
+ "\n"
121
+ "asyncio.run(main())"
96
122
97
123
#: ../../library/asyncio-subprocess.rst:58
98
124
msgid "See also the `Examples`_ subsection."
@@ -108,16 +134,16 @@ msgstr "서브 프로세스를 만듭니다."
108
134
109
135
#: ../../library/asyncio-subprocess.rst:70
110
136
#: ../../library/asyncio-subprocess.rst:89
111
- #, fuzzy
112
137
msgid ""
113
138
"The *limit* argument sets the buffer limit for :class:`StreamReader` "
114
139
"wrappers for :attr:`~asyncio.subprocess.Process.stdout` and "
115
140
":attr:`~asyncio.subprocess.Process.stderr` (if :const:`subprocess.PIPE` "
116
141
"is passed to *stdout* and *stderr* arguments)."
117
142
msgstr ""
118
- "*limit* 인자는 :attr:`Process.stdout` 과 :attr:`Process.stderr`\\ 에 대한 "
119
- ":class:`StreamReader` 래퍼의 버퍼 한계를 설정합니다 (:attr:`subprocess.PIPE`\\ 가 "
120
- "*stdout* 및 *stderr* 인자에 전달되었을 때)."
143
+ "*limit* 인자는 :attr:`~asyncio.subprocess.Process.stdout` 과 "
144
+ ":attr:`~asyncio.subprocess.Process.stderr`\\ 에 대한 :class:`StreamReader` "
145
+ "래퍼의 버퍼 한계를 설정합니다 (:const:`subprocess.PIPE`\\ 가 *stdout* 및 *stderr* 인자에 "
146
+ "전달되었을 때)."
121
147
122
148
#: ../../library/asyncio-subprocess.rst:74
123
149
#: ../../library/asyncio-subprocess.rst:93
@@ -132,9 +158,8 @@ msgstr "다른 매개 변수에 관해서는 :meth:`loop.subprocess_exec`\\의
132
158
133
159
#: ../../library/asyncio-subprocess.rst:79
134
160
#: ../../library/asyncio-subprocess.rst:107
135
- #, fuzzy
136
161
msgid "Removed the *loop* parameter."
137
- msgstr "*loop* 매개 변수 "
162
+ msgstr "*loop* 매개 변수를 제거했습니다. "
138
163
139
164
#: ../../library/asyncio-subprocess.rst:87
140
165
msgid "Run the *cmd* shell command."
@@ -193,18 +218,16 @@ msgid "Can be passed to the *stdin*, *stdout* or *stderr* parameters."
193
218
msgstr "*stdin*, *stdout* 또는 *stderr* 매개 변수로 전달될 수 있습니다."
194
219
195
220
#: ../../library/asyncio-subprocess.rst:133
196
- #, fuzzy
197
221
msgid ""
198
222
"If *PIPE* is passed to *stdin* argument, the :attr:`Process.stdin "
199
223
"<asyncio.subprocess.Process.stdin>` attribute will point to a "
200
224
":class:`~asyncio.StreamWriter` instance."
201
225
msgstr ""
202
226
"*PIPE*\\ 가 *stdin* 인자로 전달되면, :attr:`Process.stdin "
203
- "<asyncio.subprocess.Process.stdin>` 어트리뷰트는 :class:`StreamWriter` 인스턴스를 "
204
- "가리킵니다."
227
+ "<asyncio.subprocess.Process.stdin>` 어트리뷰트는 :class:`~asyncio. StreamWriter`"
228
+ " 인스턴스를 가리킵니다."
205
229
206
230
#: ../../library/asyncio-subprocess.rst:137
207
- #, fuzzy
208
231
msgid ""
209
232
"If *PIPE* is passed to *stdout* or *stderr* arguments, the "
210
233
":attr:`Process.stdout <asyncio.subprocess.Process.stdout>` and "
@@ -213,8 +236,8 @@ msgid ""
213
236
msgstr ""
214
237
"*PIPE*\\ 가 *stdout* 이나 *stderr* 인자로 전달되면, :attr:`Process.stdout "
215
238
"<asyncio.subprocess.Process.stdout>` 과 :attr:`Process.stderr "
216
- "<asyncio.subprocess.Process.stderr>` 어트리뷰트는 :class:`StreamReader` 인스턴스를 "
217
- "가리 킵니다."
239
+ "<asyncio.subprocess.Process.stderr>` 어트리뷰트는 "
240
+ ":class:`~asyncio.StreamReader` 인스턴스를 가리 킵니다."
218
241
219
242
#: ../../library/asyncio-subprocess.rst:145
220
243
msgid ""
@@ -248,14 +271,13 @@ msgstr ""
248
271
"래퍼입니다."
249
272
250
273
#: ../../library/asyncio-subprocess.rst:167
251
- #, fuzzy
252
274
msgid ""
253
275
"An object that wraps OS processes created by the "
254
276
":func:`~asyncio.create_subprocess_exec` and "
255
277
":func:`~asyncio.create_subprocess_shell` functions."
256
278
msgstr ""
257
- ":func:`create_subprocess_exec` 와 :func:`create_subprocess_shell` 함수로 만들어진 "
258
- " OS 프로세스를 감싸는 객체."
279
+ ":func:`~asyncio. create_subprocess_exec` 와 "
280
+ ":func:`~asyncio.create_subprocess_shell` 함수로 만들어진 OS 프로세스를 감싸는 객체."
259
281
260
282
#: ../../library/asyncio-subprocess.rst:171
261
283
msgid ""
@@ -272,15 +294,14 @@ msgid ""
272
294
msgstr "Popen과 달리, Process 인스턴스에는 :meth:`~subprocess.Popen.poll` 메서드와 동등한 것이 없습니다;"
273
295
274
296
#: ../../library/asyncio-subprocess.rst:178
275
- #, fuzzy
276
297
msgid ""
277
298
"the :meth:`~asyncio.subprocess.Process.communicate` and "
278
299
":meth:`~asyncio.subprocess.Process.wait` methods don't have a *timeout* "
279
300
"parameter: use the :func:`~asyncio.wait_for` function;"
280
301
msgstr ""
281
302
":meth:`~asyncio.subprocess.Process.communicate` 와 "
282
303
":meth:`~asyncio.subprocess.Process.wait` 메서드에는 *timeout* 매개 변수가 없습니다: "
283
- ":func:`wait_for` 함수를 사용하십시오;"
304
+ ":func:`~asyncio. wait_for` 함수를 사용하십시오;"
284
305
285
306
#: ../../library/asyncio-subprocess.rst:182
286
307
msgid ""
@@ -334,7 +355,7 @@ msgstr "데이터를 *stdin*\\으로 보냅니다 (*input*\\이 ``None``\\이
334
355
335
356
#: ../../library/asyncio-subprocess.rst:214
336
357
msgid "closes *stdin*;"
337
- msgstr ""
358
+ msgstr "*stdin* \\ 을 닫습니다; "
338
359
339
360
#: ../../library/asyncio-subprocess.rst:215
340
361
msgid "read data from *stdout* and *stderr*, until EOF is reached;"
@@ -384,87 +405,79 @@ msgstr "데이터가 메모리에 버퍼링 되므로, 데이터 크기가 크
384
405
385
406
#: ../../library/asyncio-subprocess.rst:239
386
407
msgid "*stdin* gets closed when ``input=None`` too."
387
- msgstr ""
408
+ msgstr "``input=None`` \\ 일 때도 *stdin* \\ 이 닫힙니다. "
388
409
389
410
#: ../../library/asyncio-subprocess.rst:243
390
411
msgid "Sends the signal *signal* to the child process."
391
412
msgstr "시그널 *signal*\\ 를 자식 프로세스로 보냅니다."
392
413
393
414
#: ../../library/asyncio-subprocess.rst:247
394
- #, fuzzy
395
415
msgid ""
396
416
"On Windows, :py:const:`~signal.SIGTERM` is an alias for "
397
417
":meth:`terminate`. ``CTRL_C_EVENT`` and ``CTRL_BREAK_EVENT`` can be sent "
398
418
"to processes started with a *creationflags* parameter which includes "
399
419
"``CREATE_NEW_PROCESS_GROUP``."
400
420
msgstr ""
401
- "윈도우에서, :py:data:`SIGTERM`\\ 은 :meth:`terminate`\\ 의 별칭입니다. ``CTRL_C_EVENT``"
402
- " 와 ``CTRL_BREAK_EVENT``\\ 는 ``CREATE_NEW_PROCESS_GROUP``\\ 을 포함하는 "
403
- "*creationflags* 매개 변수로 시작된 프로세스로 전송될 수 있습니다."
421
+ "윈도우에서, :py:const:`~signal.SIGTERM`\\ 은 :meth:`terminate`\\ 의 별칭입니다. "
422
+ "``CTRL_C_EVENT`` 와 ``CTRL_BREAK_EVENT``\\ 는 "
423
+ "``CREATE_NEW_PROCESS_GROUP``\\ 을 포함하는 *creationflags* 매개 변수로 시작된 프로세스로 전송될"
424
+ " 수 있습니다."
404
425
405
426
#: ../../library/asyncio-subprocess.rst:254
406
427
msgid "Stop the child process."
407
428
msgstr "자식 프로세스를 중지합니다."
408
429
409
430
#: ../../library/asyncio-subprocess.rst:256
410
- #, fuzzy
411
431
msgid ""
412
432
"On POSIX systems this method sends :py:const:`~signal.SIGTERM` to the "
413
433
"child process."
414
- msgstr "POSIX 시스템에서 이 메서드는 :py:data:` signal.SIGTERM`\\ 를 자식 프로세스로 보냅니다."
434
+ msgstr "POSIX 시스템에서 이 메서드는 :py:const:`~ signal.SIGTERM`\\ 를 자식 프로세스로 보냅니다."
415
435
416
436
#: ../../library/asyncio-subprocess.rst:259
417
- #, fuzzy
418
437
msgid ""
419
438
"On Windows the Win32 API function :c:func:`!TerminateProcess` is called "
420
439
"to stop the child process."
421
- msgstr "윈도우에서는 Win32 API 함수 :c:func:`TerminateProcess`\\ 가 호출되어 자식 프로세스를 중지합니다."
440
+ msgstr "윈도우에서는 Win32 API 함수 :c:func:`! TerminateProcess`\\ 가 호출되어 자식 프로세스를 중지합니다."
422
441
423
442
#: ../../library/asyncio-subprocess.rst:264
424
- #, fuzzy
425
443
msgid "Kill the child process."
426
- msgstr "자식 프로세스를 중지합니다 ."
444
+ msgstr "자식 프로세스를 죽입니다 ."
427
445
428
446
#: ../../library/asyncio-subprocess.rst:266
429
- #, fuzzy
430
447
msgid ""
431
448
"On POSIX systems this method sends :py:data:`~signal.SIGKILL` to the "
432
449
"child process."
433
- msgstr "POSIX 시스템에서 이 메서드는 :py:data:`SIGKILL`\\ 를 자식 프로세스로 보냅니다."
450
+ msgstr "POSIX 시스템에서 이 메서드는 :py:data:`~signal. SIGKILL`\\ 를 자식 프로세스로 보냅니다."
434
451
435
452
#: ../../library/asyncio-subprocess.rst:269
436
453
msgid "On Windows this method is an alias for :meth:`terminate`."
437
454
msgstr "윈도우에서 이 메서드는 :meth:`terminate`\\ 의 별칭입니다."
438
455
439
456
#: ../../library/asyncio-subprocess.rst:273
440
- #, fuzzy
441
457
msgid ""
442
458
"Standard input stream (:class:`~asyncio.StreamWriter`) or ``None`` if the"
443
459
" process was created with ``stdin=None``."
444
460
msgstr ""
445
- "표준 입력 스트림(:class:`StreamWriter`) 또는 프로세스가 ``stdin=None``\\ 으로 만들어졌으면 "
446
- "``None``."
461
+ "표준 입력 스트림(:class:`~asyncio. StreamWriter`) 또는 프로세스가 ``stdin=None``\\ 으로 "
462
+ "만들어졌으면 ``None``."
447
463
448
464
#: ../../library/asyncio-subprocess.rst:278
449
- #, fuzzy
450
465
msgid ""
451
466
"Standard output stream (:class:`~asyncio.StreamReader`) or ``None`` if "
452
467
"the process was created with ``stdout=None``."
453
468
msgstr ""
454
- "표준 출력 스트림(:class:`StreamReader`) 또는 프로세스가 ``stdout=None``\\ 으로 만들어졌으면 "
455
- "``None``."
469
+ "표준 출력 스트림(:class:`~asyncio. StreamReader`) 또는 프로세스가 ``stdout=None``\\ 으로 "
470
+ "만들어졌으면 ``None``."
456
471
457
472
#: ../../library/asyncio-subprocess.rst:283
458
- #, fuzzy
459
473
msgid ""
460
474
"Standard error stream (:class:`~asyncio.StreamReader`) or ``None`` if the"
461
475
" process was created with ``stderr=None``."
462
476
msgstr ""
463
- "표준 에러 스트림(:class:`StreamReader`) 또는 프로세스가 ``stderr=None``\\ 으로 만들어졌으면 "
464
- "``None``."
477
+ "표준 에러 스트림(:class:`~asyncio. StreamReader`) 또는 프로세스가 ``stderr=None``\\ 으로 "
478
+ "만들어졌으면 ``None``."
465
479
466
480
#: ../../library/asyncio-subprocess.rst:288
467
- #, fuzzy
468
481
msgid ""
469
482
"Use the :meth:`communicate` method rather than "
470
483
":attr:`process.stdin.write() <stdin>`, :attr:`await process.stdout.read()"
@@ -473,7 +486,7 @@ msgid ""
473
486
"child process."
474
487
msgstr ""
475
488
":attr:`process.stdin.write() <stdin>`, :attr:`await process.stdout.read()"
476
- " <stdout>` 또는 :attr:`await process.stderr.read <stderr>` 대신 "
489
+ " <stdout>` 또는 :attr:`await process.stderr.read() <stderr>` 대신 "
477
490
":meth:`communicate` 메서드를 사용하십시오. 이렇게 하면 스트림이 읽기나 쓰기를 일시 중지하고 자식 프로세스를 "
478
491
"블록하는 것으로 인한 교착 상태가 발생하지 않습니다."
479
492
@@ -482,12 +495,13 @@ msgid "Process identification number (PID)."
482
495
msgstr "프로세스 식별 번호 (PID)."
483
496
484
497
#: ../../library/asyncio-subprocess.rst:299
485
- #, fuzzy
486
498
msgid ""
487
499
"Note that for processes created by the "
488
500
":func:`~asyncio.create_subprocess_shell` function, this attribute is the "
489
501
"PID of the spawned shell."
490
- msgstr ":func:`create_subprocess_shell` 함수로 만들어진 프로세스의 경우, 이 어트리뷰트는 생성된 셸의 PID입니다."
502
+ msgstr ""
503
+ ":func:`~asyncio.create_subprocess_shell` 함수로 만들어진 프로세스의 경우, 이 어트리뷰트는 생성된 "
504
+ "셸의 PID입니다."
491
505
492
506
#: ../../library/asyncio-subprocess.rst:304
493
507
msgid "Return code of the process when it exits."
@@ -598,6 +612,27 @@ msgid ""
598
612
"date = asyncio.run(get_date())\n"
599
613
"print(f\" Current date: {date}\" )"
600
614
msgstr ""
615
+ "import asyncio\n"
616
+ "import sys\n"
617
+ "\n"
618
+ "async def get_date():\n"
619
+ " code = 'import datetime; print(datetime.datetime.now())'\n"
620
+ "\n"
621
+ " # 서브 프로세스를 만듭니다; 표준 출력을 파이프로 리디렉트합니다.\n"
622
+ " proc = await asyncio.create_subprocess_exec(\n"
623
+ " sys.executable, '-c', code,\n"
624
+ " stdout=asyncio.subprocess.PIPE)\n"
625
+ "\n"
626
+ " # 한 줄의 출력을 읽습니다.\n"
627
+ " data = await proc.stdout.readline()\n"
628
+ " line = data.decode('ascii').rstrip()\n"
629
+ "\n"
630
+ " # 서브 프로세스 종료를 기다립니다.\n"
631
+ " await proc.wait()\n"
632
+ " return line\n"
633
+ "\n"
634
+ "date = asyncio.run(get_date())\n"
635
+ "print(f\" Current date: {date}\" )"
601
636
602
637
#: ../../library/asyncio-subprocess.rst:380
603
638
msgid ""
@@ -607,6 +642,3 @@ msgstr ""
607
642
"저수준 API를 사용하여 작성된 :ref:`같은 예제 <asyncio_example_subprocess_proto>`\\ 도 "
608
643
"참조하십시오."
609
644
610
- #~ msgid "Kill the child."
611
- #~ msgstr "자식을 죽입니다."
612
-
0 commit comments