@@ -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