@@ -17,9 +17,8 @@ msgstr ""
17
17
"Generated-By : Babel 2.17.0\n "
18
18
19
19
#: ../../library/pty.rst:2
20
- #, fuzzy
21
20
msgid ":mod:`!pty` --- Pseudo-terminal utilities"
22
- msgstr ":mod:`pty` --- 의사 터미널 유틸리티"
21
+ msgstr ":mod:`! pty` --- 의사 터미널 유틸리티"
23
22
24
23
#: ../../library/pty.rst:11
25
24
msgid "**Source code:** :source:`Lib/pty.py`"
@@ -39,14 +38,13 @@ msgid "Availability"
39
38
msgstr "가용성"
40
39
41
40
#: ../../library/pty.rst:21
42
- #, fuzzy
43
41
msgid ""
44
42
"Pseudo-terminal handling is highly platform dependent. This code is "
45
43
"mainly tested on Linux, FreeBSD, and macOS (it is supposed to work on "
46
44
"other POSIX platforms but it's not been thoroughly tested)."
47
45
msgstr ""
48
- "의사 터미널 처리는 플랫폼에 따라 매우 다르므로, 리눅스에서만 수행할 수 있는 코드가 있습니다. (리눅스 코드는 다른 플랫폼에서도 "
49
- "작동하리라고 기대되지만, 아직 테스트 되지는 않았습니다.) "
46
+ "의사 터미널 처리는 플랫폼에 따라 매우 다릅니다. 이 코드는 주로 리눅스, FreeBSD, macOS 에서 테스트 되었습니다 (다른 "
47
+ " POSIX 플랫폼에서도 작동하리라고 기대되지만, 충분히 테스트 되지는 않았습니다). "
50
48
51
49
#: ../../library/pty.rst:25
52
50
msgid "The :mod:`pty` module defines the following functions:"
@@ -100,15 +98,15 @@ msgid ""
100
98
msgstr ""
101
99
102
100
#: ../../library/pty.rst:59
103
- #, fuzzy
104
101
msgid ""
105
102
"The functions *master_read* and *stdin_read* are passed a file descriptor"
106
103
" which they should read from, and they should always return a byte "
107
104
"string. In order to force spawn to return before the child process exits "
108
105
"an empty byte array should be returned to signal end of file."
109
106
msgstr ""
110
107
"함수 *master_read*\\ 와 *stdin_read*\\ 는 그들이 읽어야 할 파일 기술자를 전달받고, 항상 바이트열을 반환해야"
111
- " 합니다. 자식 프로세스가 종료하기 전에 spawn이 강제로 반환되게 하려면 :exc:`OSError`\\ 를 발생시켜야 합니다."
108
+ " 합니다. 자식 프로세스가 종료하기 전에 spawn이 강제로 반환되게 하려면 파일의 끝을 알리기 위해 빈 바이트열을 반환해야 "
109
+ "합니다."
112
110
113
111
#: ../../library/pty.rst:64
114
112
msgid ""
@@ -142,11 +140,10 @@ msgid "Return the exit status value from :func:`os.waitpid` on the child process
142
140
msgstr "자식 프로세스에 대한 :func:`os.waitpid`\\ 로부터 온 종료 상태 값을 반환합니다."
143
141
144
142
#: ../../library/pty.rst:79
145
- #, fuzzy
146
143
msgid ""
147
144
":func:`os.waitstatus_to_exitcode` can be used to convert the exit status "
148
145
"into an exit code."
149
- msgstr ":func:`waitstatus_to_exitcode`\\ 를 사용하여 종료 상태를 종료 코드로 변환할 수 있습니다."
146
+ msgstr ":func:`os. waitstatus_to_exitcode`\\ 를 사용하여 종료 상태를 종료 코드로 변환할 수 있습니다."
150
147
151
148
#: ../../library/pty.rst:82
152
149
msgid ""
@@ -207,19 +204,34 @@ msgid ""
207
204
" script.write(('Script done on %s\\ n' % time.asctime()).encode())\n"
208
205
" print('Script done, file is', filename)"
209
206
msgstr ""
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)"
225
237
0 commit comments