@@ -61,6 +61,23 @@ msgid ""
6161"\n"
6262"asyncio.run(run('ls /zzz'))"
6363msgstr ""
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'))"
6481
6582#: ../../library/asyncio-subprocess.rst:40
6683msgid "will print::"
@@ -72,6 +89,9 @@ msgid ""
7289"[stderr]\n"
7390"ls: /zzz: No such file or directory"
7491msgstr ""
92+ "['ls /zzz' exited with 1]\n"
93+ "[stderr]\n"
94+ "ls: /zzz: No such file or directory"
7595
7696#: ../../library/asyncio-subprocess.rst:46
7797msgid ""
@@ -93,6 +113,12 @@ msgid ""
93113"\n"
94114"asyncio.run(main())"
95115msgstr ""
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())"
96122
97123#: ../../library/asyncio-subprocess.rst:58
98124msgid "See also the `Examples`_ subsection."
@@ -108,16 +134,16 @@ msgstr "서브 프로세스를 만듭니다."
108134
109135#: ../../library/asyncio-subprocess.rst:70
110136#: ../../library/asyncio-subprocess.rst:89
111- #, fuzzy
112137msgid ""
113138"The *limit* argument sets the buffer limit for :class:`StreamReader` "
114139"wrappers for :attr:`~asyncio.subprocess.Process.stdout` and "
115140":attr:`~asyncio.subprocess.Process.stderr` (if :const:`subprocess.PIPE` "
116141"is passed to *stdout* and *stderr* arguments)."
117142msgstr ""
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+ "전달되었을 때)."
121147
122148#: ../../library/asyncio-subprocess.rst:74
123149#: ../../library/asyncio-subprocess.rst:93
@@ -132,9 +158,8 @@ msgstr "다른 매개 변수에 관해서는 :meth:`loop.subprocess_exec`\\의
132158
133159#: ../../library/asyncio-subprocess.rst:79
134160#: ../../library/asyncio-subprocess.rst:107
135- #, fuzzy
136161msgid "Removed the *loop* parameter."
137- msgstr "*loop* 매개 변수 "
162+ msgstr "*loop* 매개 변수를 제거했습니다. "
138163
139164#: ../../library/asyncio-subprocess.rst:87
140165msgid "Run the *cmd* shell command."
@@ -193,18 +218,16 @@ msgid "Can be passed to the *stdin*, *stdout* or *stderr* parameters."
193218msgstr "*stdin*, *stdout* 또는 *stderr* 매개 변수로 전달될 수 있습니다."
194219
195220#: ../../library/asyncio-subprocess.rst:133
196- #, fuzzy
197221msgid ""
198222"If *PIPE* is passed to *stdin* argument, the :attr:`Process.stdin "
199223"<asyncio.subprocess.Process.stdin>` attribute will point to a "
200224":class:`~asyncio.StreamWriter` instance."
201225msgstr ""
202226"*PIPE*\\ 가 *stdin* 인자로 전달되면, :attr:`Process.stdin "
203- "<asyncio.subprocess.Process.stdin>` 어트리뷰트는 :class:`StreamWriter` 인스턴스를 "
204- "가리킵니다."
227+ "<asyncio.subprocess.Process.stdin>` 어트리뷰트는 :class:`~asyncio. StreamWriter`"
228+ " 인스턴스를 가리킵니다."
205229
206230#: ../../library/asyncio-subprocess.rst:137
207- #, fuzzy
208231msgid ""
209232"If *PIPE* is passed to *stdout* or *stderr* arguments, the "
210233":attr:`Process.stdout <asyncio.subprocess.Process.stdout>` and "
@@ -213,8 +236,8 @@ msgid ""
213236msgstr ""
214237"*PIPE*\\ 가 *stdout* 이나 *stderr* 인자로 전달되면, :attr:`Process.stdout "
215238"<asyncio.subprocess.Process.stdout>` 과 :attr:`Process.stderr "
216- "<asyncio.subprocess.Process.stderr>` 어트리뷰트는 :class:`StreamReader` 인스턴스를 "
217- "가리 킵니다."
239+ "<asyncio.subprocess.Process.stderr>` 어트리뷰트는 "
240+ ":class:`~asyncio.StreamReader` 인스턴스를 가리 킵니다."
218241
219242#: ../../library/asyncio-subprocess.rst:145
220243msgid ""
@@ -248,14 +271,13 @@ msgstr ""
248271"래퍼입니다."
249272
250273#: ../../library/asyncio-subprocess.rst:167
251- #, fuzzy
252274msgid ""
253275"An object that wraps OS processes created by the "
254276":func:`~asyncio.create_subprocess_exec` and "
255277":func:`~asyncio.create_subprocess_shell` functions."
256278msgstr ""
257- ":func:`create_subprocess_exec` 와 :func:`create_subprocess_shell` 함수로 만들어진 "
258- " OS 프로세스를 감싸는 객체."
279+ ":func:`~asyncio. create_subprocess_exec` 와 "
280+ ":func:`~asyncio.create_subprocess_shell` 함수로 만들어진 OS 프로세스를 감싸는 객체."
259281
260282#: ../../library/asyncio-subprocess.rst:171
261283msgid ""
@@ -272,15 +294,14 @@ msgid ""
272294msgstr "Popen과 달리, Process 인스턴스에는 :meth:`~subprocess.Popen.poll` 메서드와 동등한 것이 없습니다;"
273295
274296#: ../../library/asyncio-subprocess.rst:178
275- #, fuzzy
276297msgid ""
277298"the :meth:`~asyncio.subprocess.Process.communicate` and "
278299":meth:`~asyncio.subprocess.Process.wait` methods don't have a *timeout* "
279300"parameter: use the :func:`~asyncio.wait_for` function;"
280301msgstr ""
281302":meth:`~asyncio.subprocess.Process.communicate` 와 "
282303":meth:`~asyncio.subprocess.Process.wait` 메서드에는 *timeout* 매개 변수가 없습니다: "
283- ":func:`wait_for` 함수를 사용하십시오;"
304+ ":func:`~asyncio. wait_for` 함수를 사용하십시오;"
284305
285306#: ../../library/asyncio-subprocess.rst:182
286307msgid ""
@@ -334,7 +355,7 @@ msgstr "데이터를 *stdin*\\으로 보냅니다 (*input*\\이 ``None``\\이
334355
335356#: ../../library/asyncio-subprocess.rst:214
336357msgid "closes *stdin*;"
337- msgstr ""
358+ msgstr "*stdin* \\ 을 닫습니다; "
338359
339360#: ../../library/asyncio-subprocess.rst:215
340361msgid "read data from *stdout* and *stderr*, until EOF is reached;"
@@ -384,87 +405,79 @@ msgstr "데이터가 메모리에 버퍼링 되므로, 데이터 크기가 크
384405
385406#: ../../library/asyncio-subprocess.rst:239
386407msgid "*stdin* gets closed when ``input=None`` too."
387- msgstr ""
408+ msgstr "``input=None`` \\ 일 때도 *stdin* \\ 이 닫힙니다. "
388409
389410#: ../../library/asyncio-subprocess.rst:243
390411msgid "Sends the signal *signal* to the child process."
391412msgstr "시그널 *signal*\\ 를 자식 프로세스로 보냅니다."
392413
393414#: ../../library/asyncio-subprocess.rst:247
394- #, fuzzy
395415msgid ""
396416"On Windows, :py:const:`~signal.SIGTERM` is an alias for "
397417":meth:`terminate`. ``CTRL_C_EVENT`` and ``CTRL_BREAK_EVENT`` can be sent "
398418"to processes started with a *creationflags* parameter which includes "
399419"``CREATE_NEW_PROCESS_GROUP``."
400420msgstr ""
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+ " 수 있습니다."
404425
405426#: ../../library/asyncio-subprocess.rst:254
406427msgid "Stop the child process."
407428msgstr "자식 프로세스를 중지합니다."
408429
409430#: ../../library/asyncio-subprocess.rst:256
410- #, fuzzy
411431msgid ""
412432"On POSIX systems this method sends :py:const:`~signal.SIGTERM` to the "
413433"child process."
414- msgstr "POSIX 시스템에서 이 메서드는 :py:data:` signal.SIGTERM`\\ 를 자식 프로세스로 보냅니다."
434+ msgstr "POSIX 시스템에서 이 메서드는 :py:const:`~ signal.SIGTERM`\\ 를 자식 프로세스로 보냅니다."
415435
416436#: ../../library/asyncio-subprocess.rst:259
417- #, fuzzy
418437msgid ""
419438"On Windows the Win32 API function :c:func:`!TerminateProcess` is called "
420439"to stop the child process."
421- msgstr "윈도우에서는 Win32 API 함수 :c:func:`TerminateProcess`\\ 가 호출되어 자식 프로세스를 중지합니다."
440+ msgstr "윈도우에서는 Win32 API 함수 :c:func:`! TerminateProcess`\\ 가 호출되어 자식 프로세스를 중지합니다."
422441
423442#: ../../library/asyncio-subprocess.rst:264
424- #, fuzzy
425443msgid "Kill the child process."
426- msgstr "자식 프로세스를 중지합니다 ."
444+ msgstr "자식 프로세스를 죽입니다 ."
427445
428446#: ../../library/asyncio-subprocess.rst:266
429- #, fuzzy
430447msgid ""
431448"On POSIX systems this method sends :py:data:`~signal.SIGKILL` to the "
432449"child process."
433- msgstr "POSIX 시스템에서 이 메서드는 :py:data:`SIGKILL`\\ 를 자식 프로세스로 보냅니다."
450+ msgstr "POSIX 시스템에서 이 메서드는 :py:data:`~signal. SIGKILL`\\ 를 자식 프로세스로 보냅니다."
434451
435452#: ../../library/asyncio-subprocess.rst:269
436453msgid "On Windows this method is an alias for :meth:`terminate`."
437454msgstr "윈도우에서 이 메서드는 :meth:`terminate`\\ 의 별칭입니다."
438455
439456#: ../../library/asyncio-subprocess.rst:273
440- #, fuzzy
441457msgid ""
442458"Standard input stream (:class:`~asyncio.StreamWriter`) or ``None`` if the"
443459" process was created with ``stdin=None``."
444460msgstr ""
445- "표준 입력 스트림(:class:`StreamWriter`) 또는 프로세스가 ``stdin=None``\\ 으로 만들어졌으면 "
446- "``None``."
461+ "표준 입력 스트림(:class:`~asyncio. StreamWriter`) 또는 프로세스가 ``stdin=None``\\ 으로 "
462+ "만들어졌으면 ``None``."
447463
448464#: ../../library/asyncio-subprocess.rst:278
449- #, fuzzy
450465msgid ""
451466"Standard output stream (:class:`~asyncio.StreamReader`) or ``None`` if "
452467"the process was created with ``stdout=None``."
453468msgstr ""
454- "표준 출력 스트림(:class:`StreamReader`) 또는 프로세스가 ``stdout=None``\\ 으로 만들어졌으면 "
455- "``None``."
469+ "표준 출력 스트림(:class:`~asyncio. StreamReader`) 또는 프로세스가 ``stdout=None``\\ 으로 "
470+ "만들어졌으면 ``None``."
456471
457472#: ../../library/asyncio-subprocess.rst:283
458- #, fuzzy
459473msgid ""
460474"Standard error stream (:class:`~asyncio.StreamReader`) or ``None`` if the"
461475" process was created with ``stderr=None``."
462476msgstr ""
463- "표준 에러 스트림(:class:`StreamReader`) 또는 프로세스가 ``stderr=None``\\ 으로 만들어졌으면 "
464- "``None``."
477+ "표준 에러 스트림(:class:`~asyncio. StreamReader`) 또는 프로세스가 ``stderr=None``\\ 으로 "
478+ "만들어졌으면 ``None``."
465479
466480#: ../../library/asyncio-subprocess.rst:288
467- #, fuzzy
468481msgid ""
469482"Use the :meth:`communicate` method rather than "
470483":attr:`process.stdin.write() <stdin>`, :attr:`await process.stdout.read()"
@@ -473,7 +486,7 @@ msgid ""
473486"child process."
474487msgstr ""
475488":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>` 대신 "
477490":meth:`communicate` 메서드를 사용하십시오. 이렇게 하면 스트림이 읽기나 쓰기를 일시 중지하고 자식 프로세스를 "
478491"블록하는 것으로 인한 교착 상태가 발생하지 않습니다."
479492
@@ -482,12 +495,13 @@ msgid "Process identification number (PID)."
482495msgstr "프로세스 식별 번호 (PID)."
483496
484497#: ../../library/asyncio-subprocess.rst:299
485- #, fuzzy
486498msgid ""
487499"Note that for processes created by the "
488500":func:`~asyncio.create_subprocess_shell` function, this attribute is the "
489501"PID of the spawned shell."
490- msgstr ":func:`create_subprocess_shell` 함수로 만들어진 프로세스의 경우, 이 어트리뷰트는 생성된 셸의 PID입니다."
502+ msgstr ""
503+ ":func:`~asyncio.create_subprocess_shell` 함수로 만들어진 프로세스의 경우, 이 어트리뷰트는 생성된 "
504+ "셸의 PID입니다."
491505
492506#: ../../library/asyncio-subprocess.rst:304
493507msgid "Return code of the process when it exits."
@@ -598,6 +612,27 @@ msgid ""
598612"date = asyncio.run(get_date())\n"
599613"print(f\" Current date: {date}\" )"
600614msgstr ""
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}\" )"
601636
602637#: ../../library/asyncio-subprocess.rst:380
603638msgid ""
@@ -607,6 +642,3 @@ msgstr ""
607642"저수준 API를 사용하여 작성된 :ref:`같은 예제 <asyncio_example_subprocess_proto>`\\ 도 "
608643"참조하십시오."
609644
610- #~ msgid "Kill the child."
611- #~ msgstr "자식을 죽입니다."
612-
0 commit comments