@@ -17,9 +17,8 @@ msgstr ""
1717"Generated-By : Babel 2.17.0\n "
1818
1919#: ../../library/pty.rst:2
20- #, fuzzy
2120msgid ":mod:`!pty` --- Pseudo-terminal utilities"
22- msgstr ":mod:`pty` --- 의사 터미널 유틸리티"
21+ msgstr ":mod:`! pty` --- 의사 터미널 유틸리티"
2322
2423#: ../../library/pty.rst:11
2524msgid "**Source code:** :source:`Lib/pty.py`"
@@ -39,14 +38,13 @@ msgid "Availability"
3938msgstr "가용성"
4039
4140#: ../../library/pty.rst:21
42- #, fuzzy
4341msgid ""
4442"Pseudo-terminal handling is highly platform dependent. This code is "
4543"mainly tested on Linux, FreeBSD, and macOS (it is supposed to work on "
4644"other POSIX platforms but it's not been thoroughly tested)."
4745msgstr ""
48- "의사 터미널 처리는 플랫폼에 따라 매우 다르므로, 리눅스에서만 수행할 수 있는 코드가 있습니다. (리눅스 코드는 다른 플랫폼에서도 "
49- "작동하리라고 기대되지만, 아직 테스트 되지는 않았습니다.) "
46+ "의사 터미널 처리는 플랫폼에 따라 매우 다릅니다. 이 코드는 주로 리눅스, FreeBSD, macOS 에서 테스트 되었습니다 (다른 "
47+ " POSIX 플랫폼에서도 작동하리라고 기대되지만, 충분히 테스트 되지는 않았습니다). "
5048
5149#: ../../library/pty.rst:25
5250msgid "The :mod:`pty` module defines the following functions:"
@@ -100,15 +98,15 @@ msgid ""
10098msgstr ""
10199
102100#: ../../library/pty.rst:59
103- #, fuzzy
104101msgid ""
105102"The functions *master_read* and *stdin_read* are passed a file descriptor"
106103" which they should read from, and they should always return a byte "
107104"string. In order to force spawn to return before the child process exits "
108105"an empty byte array should be returned to signal end of file."
109106msgstr ""
110107"함수 *master_read*\\ 와 *stdin_read*\\ 는 그들이 읽어야 할 파일 기술자를 전달받고, 항상 바이트열을 반환해야"
111- " 합니다. 자식 프로세스가 종료하기 전에 spawn이 강제로 반환되게 하려면 :exc:`OSError`\\ 를 발생시켜야 합니다."
108+ " 합니다. 자식 프로세스가 종료하기 전에 spawn이 강제로 반환되게 하려면 파일의 끝을 알리기 위해 빈 바이트열을 반환해야 "
109+ "합니다."
112110
113111#: ../../library/pty.rst:64
114112msgid ""
@@ -142,11 +140,10 @@ msgid "Return the exit status value from :func:`os.waitpid` on the child process
142140msgstr "자식 프로세스에 대한 :func:`os.waitpid`\\ 로부터 온 종료 상태 값을 반환합니다."
143141
144142#: ../../library/pty.rst:79
145- #, fuzzy
146143msgid ""
147144":func:`os.waitstatus_to_exitcode` can be used to convert the exit status "
148145"into an exit code."
149- msgstr ":func:`waitstatus_to_exitcode`\\ 를 사용하여 종료 상태를 종료 코드로 변환할 수 있습니다."
146+ msgstr ":func:`os. waitstatus_to_exitcode`\\ 를 사용하여 종료 상태를 종료 코드로 변환할 수 있습니다."
150147
151148#: ../../library/pty.rst:82
152149msgid ""
@@ -207,19 +204,34 @@ msgid ""
207204" script.write(('Script done on %s\\ n' % time.asctime()).encode())\n"
208205" print('Script done, file is', filename)"
209206msgstr ""
210-
211- #~ msgid ""
212- #~ "If both callbacks signal EOF then "
213- #~ "*spawn* will probably never return, "
214- #~ "unless *select* throws an error on "
215- #~ "your platform when passed three empty"
216- #~ " lists. This is a bug, documented "
217- #~ "in `issue 26228 "
218- #~ "<https://bugs.python.org/issue26228>`_."
219- #~ msgstr ""
220- #~ "두 콜백이 모두 EOF 신호를 보내면, *select*\\가"
221- #~ " 세 개의 빈 리스트를 전달할 때 플랫폼에서 "
222- #~ "에러를 일으키지 않는 한 *spawn*\\은 아마도 절대"
223- #~ " 반환하지 않습니다. 이것은 버그이고, `issue 26228"
224- #~ " <https://bugs.python.org/issue26228>`_\\에서 설명하고 있습니다."
207+ "import argparse\n"
208+ "import os\n"
209+ "import pty\n"
210+ "import sys\n"
211+ "import time\n"
212+ "\n"
213+ "parser = argparse.ArgumentParser()\n"
214+ "parser.add_argument('-a', dest='append', action='store_true')\n"
215+ "parser.add_argument('-p', dest='use_python', action='store_true')\n"
216+ "parser.add_argument('filename', nargs='?', default='typescript')\n"
217+ "options = parser.parse_args()\n"
218+ "\n"
219+ "shell = sys.executable if options.use_python else os.environ.get('SHELL',"
220+ " 'sh')\n"
221+ "filename = options.filename\n"
222+ "mode = 'ab' if options.append else 'wb'\n"
223+ "\n"
224+ "with open(filename, mode) as script:\n"
225+ " def read(fd):\n"
226+ " data = os.read(fd, 1024)\n"
227+ " script.write(data)\n"
228+ " return data\n"
229+ "\n"
230+ " print('Script started, file is', filename)\n"
231+ " script.write(('Script started on %s\\ n' % time.asctime()).encode())\n"
232+ "\n"
233+ " pty.spawn(shell, read)\n"
234+ "\n"
235+ " script.write(('Script done on %s\\ n' % time.asctime()).encode())\n"
236+ " print('Script done, file is', filename)"
225237
0 commit comments