@@ -17,16 +17,14 @@ msgstr ""
17
17
"Generated-By :Babel 2.17.0\n "
18
18
19
19
#: ../../library/tempfile.rst:2
20
- #, fuzzy
21
20
msgid ":mod:`!tempfile` --- Generate temporary files and directories"
22
- msgstr ":mod:`tempfile` --- 임시 파일과 디렉터리 생성"
21
+ msgstr ":mod:`! tempfile` --- 임시 파일과 디렉터리 생성"
23
22
24
23
#: ../../library/tempfile.rst:9
25
24
msgid "**Source code:** :source:`Lib/tempfile.py`"
26
25
msgstr "**소스 코드:** :source:`Lib/tempfile.py`"
27
26
28
27
#: ../../library/tempfile.rst:17
29
- #, fuzzy
30
28
msgid ""
31
29
"This module creates temporary files and directories. It works on all "
32
30
"supported platforms. :class:`TemporaryFile`, :class:`NamedTemporaryFile`,"
@@ -37,8 +35,9 @@ msgid ""
37
35
msgstr ""
38
36
"이 모듈은 임시 파일과 디렉터리를 만듭니다. 지원되는 모든 플랫폼에서 작동합니다. :class:`TemporaryFile`, "
39
37
":class:`NamedTemporaryFile`, :class:`TemporaryDirectory` 및 "
40
- ":class:`SpooledTemporaryFile`\\ 은 자동 정리를 제공하고 컨텍스트 관리자로 사용할 수 있는 고수준 "
41
- "인터페이스입니다. :func:`mkstemp`\\ 와 :func:`mkdtemp`\\ 는 수동 정리가 필요한 저수준 함수입니다."
38
+ ":class:`SpooledTemporaryFile`\\ 은 자동 정리를 제공하고 :term:`컨텍스트 관리자 <context "
39
+ "manager>`\\ 로 사용할 수 있는 고수준 인터페이스입니다. :func:`mkstemp`\\ 와 :func:`mkdtemp`\\ 는"
40
+ " 수동 정리가 필요한 저수준 함수입니다."
42
41
43
42
#: ../../library/tempfile.rst:24
44
43
msgid ""
@@ -77,14 +76,13 @@ msgstr ""
77
76
"없는지에 의존해서는 안 됩니다."
78
77
79
78
#: ../../library/tempfile.rst:44
80
- #, fuzzy
81
79
msgid ""
82
80
"The resulting object can be used as a :term:`context manager` (see :ref"
83
81
":`tempfile-examples`). On completion of the context or destruction of "
84
82
"the file object the temporary file will be removed from the filesystem."
85
83
msgstr ""
86
- "결과 객체는 컨텍스트관리자로 사용할 수 있습니다 (:ref:`tempfile-examples` \\ 를 참조하십시오). 컨텍스트가 "
87
- "완료되거나 파일 객체가 파괴되면 임시 파일이 파일 시스템에서 제거됩니다."
84
+ "결과 객체는:term:` 컨텍스트관리자 <context manager>` \\ 로 사용할 수 있습니다 (:ref:`tempfile-"
85
+ "examples` \\ 를 참조하십시오). 컨텍스트가 완료되거나 파일 객체가 파괴되면 임시 파일이 파일 시스템에서 제거됩니다."
88
86
89
87
#: ../../library/tempfile.rst:49
90
88
msgid ""
@@ -114,13 +112,12 @@ msgstr ""
114
112
" 객체인 파일류 객체입니다."
115
113
116
114
#: ../../library/tempfile.rst:62
117
- #, fuzzy
118
115
msgid ""
119
116
"The :py:const:`os.O_TMPFILE` flag is used if it is available and works "
120
117
"(Linux-specific, requires Linux kernel 3.11 or later)."
121
118
msgstr ""
122
- ":py:data :`os.O_TMPFILE` 플래그는 사용할 수 있고 작동하면 사용됩니다 (리눅스 특정, 리눅스 커널 3.11이상이 "
123
- " 필요합니다)."
119
+ ":py:const :`os.O_TMPFILE` 플래그는 사용할 수 있고 작동하면 사용됩니다 (리눅스 특정, 리눅스 커널 3.11 "
120
+ "이상이 필요합니다)."
124
121
125
122
#: ../../library/tempfile.rst:65
126
123
msgid ""
@@ -138,9 +135,8 @@ msgstr ""
138
135
"발생시킵니다."
139
136
140
137
#: ../../library/tempfile.rst:72
141
- #, fuzzy
142
138
msgid "The :py:const:`os.O_TMPFILE` flag is now used if available."
143
- msgstr "사용할 수 있으면 :py:data :`os.O_TMPFILE` 플래그가 사용됩니다."
139
+ msgstr "사용할 수 있으면 :py:const :`os.O_TMPFILE` 플래그가 사용됩니다."
144
140
145
141
#: ../../library/tempfile.rst:74 ../../library/tempfile.rst:139
146
142
#: ../../library/tempfile.rst:169
@@ -151,13 +147,13 @@ msgstr "*errors* 매개 변수를 추가했습니다."
151
147
msgid ""
152
148
"This function operates exactly as :func:`TemporaryFile` does, except the "
153
149
"following differences:"
154
- msgstr ""
150
+ msgstr "이 함수는 다음과 같은 차이를 제외하고는 :func:`TemporaryFile` \\ 과 똑같이 작동합니다: "
155
151
156
152
#: ../../library/tempfile.rst:83
157
153
msgid ""
158
154
"This function returns a file that is guaranteed to have a visible name in"
159
155
" the file system."
160
- msgstr ""
156
+ msgstr "이 함수는 파일 시스템에서 보이는 이름을 가지는 것이 보장되는 파일을 반환합니다. "
161
157
162
158
#: ../../library/tempfile.rst:85
163
159
msgid ""
@@ -177,6 +173,10 @@ msgid ""
177
173
" with the :func:`TemporaryFile`, the directory entry does not get "
178
174
"unlinked immediately after the file creation."
179
175
msgstr ""
176
+ "반환된 객체는 항상 :attr:`!file` 어트리뷰트가 하부 실제 파일 객체인 :term:`파일류 객체 <file-like "
177
+ "object>`\\ 입니다. 이 파일류 객체는 일반 파일과 마찬가지로 :keyword:`with` 문에서 사용할 수 있습니다. 임시 "
178
+ "파일의 이름은 반환된 파일류 객체의 :attr:`!name` 어트리뷰트에서 꺼낼 수 있습니다. 유닉스에서, "
179
+ ":func:`TemporaryFile`\\ 과 달리, 파일 생성 직후에 디렉터리 항목이 삭제(unlink)되지 않습니다."
180
180
181
181
#: ../../library/tempfile.rst:97
182
182
msgid ""
@@ -252,34 +252,30 @@ msgid ""
252
252
msgstr ""
253
253
254
254
#: ../../library/tempfile.rst:142
255
- #, fuzzy
256
255
msgid "Added *delete_on_close* parameter."
257
- msgstr "*errors * 매개 변수를 추가했습니다."
256
+ msgstr "*delete_on_close * 매개 변수를 추가했습니다."
258
257
259
258
#: ../../library/tempfile.rst:148
260
- #, fuzzy
261
259
msgid ""
262
260
"This class operates exactly as :func:`TemporaryFile` does, except that "
263
261
"data is spooled in memory until the file size exceeds *max_size*, or "
264
262
"until the file's :func:`~io.IOBase.fileno` method is called, at which "
265
263
"point the contents are written to disk and operation proceeds as with "
266
264
":func:`TemporaryFile`."
267
265
msgstr ""
268
- "이함수는 파일 크기가 *max_size*\\ 를 초과할 때까지, 또는 파일의 :func:`fileno` 메서드가 호출될 때까지 "
269
- "데이터가 메모리에 스풀링 되는 것을 제외하고는 :func:`TemporaryFile`\\ 과 똑같이 작동합니다. 이 시점에서 내용은 "
270
- "디스크에 기록되고 :func:`TemporaryFile`\\ 처럼 작업이 진행됩니다."
266
+ "이클래스는 파일 크기가 *max_size*\\ 를 초과할 때까지, 또는 파일의 :func:`~io.IOBase. fileno` "
267
+ "메서드가 호출될 때까지 데이터가 메모리에 스풀링 되는 것을 제외하고는 :func:`TemporaryFile`\\ 과 똑같이 "
268
+ "작동합니다. 이 시점에서 내용은 디스크에 기록되고 :func:`TemporaryFile`\\ 처럼 작업이 진행됩니다."
271
269
272
270
#: ../../library/tempfile.rst:156
273
- #, fuzzy
274
271
msgid ""
275
272
"The resulting file has one additional method, :meth:`!rollover`, which "
276
273
"causes the file to roll over to an on-disk file regardless of its size."
277
274
msgstr ""
278
- "결과 파일에는 추가 메서드인 :func:` rollover`\\ 가 있으며, 파일 크기와 관계없이 파일을 디스크 상의 파일로 "
275
+ "결과 파일에는 추가 메서드인 :meth:`! rollover`\\ 가 있으며, 파일 크기와 관계없이 파일을 디스크 상의 파일로 "
279
276
"롤오버(roll over) 합니다."
280
277
281
278
#: ../../library/tempfile.rst:159
282
- #, fuzzy
283
279
msgid ""
284
280
"The returned object is a file-like object whose :attr:`!_file` attribute "
285
281
"is either an :class:`io.BytesIO` or :class:`io.TextIOWrapper` object "
@@ -288,15 +284,14 @@ msgid ""
288
284
"file-like object can be used in a :keyword:`with` statement, just like a "
289
285
"normal file."
290
286
msgstr ""
291
- "반환된 객체는 파일류 객체인데, :func :`rollover`\\ 가 호출되었는지에 따라 :attr:`_file` 어트리뷰트는 "
287
+ "반환된 객체는 파일류 객체인데, :meth :`rollover`\\ 가 호출되었는지에 따라 :attr:`! _file` 어트리뷰트는 "
292
288
":class:`io.BytesIO`\\ 나 :class:`io.TextIOWrapper` 객체(바이너리나 텍스트 *mode*\\ 가 "
293
289
"지정되었는지에 따라)이거나 실제 파일 객체입니다. 이 파일류 객체는 일반 파일과 마찬가지로 :keyword:`with` 문에서 "
294
290
"사용할 수 있습니다."
295
291
296
292
#: ../../library/tempfile.rst:166
297
- #, fuzzy
298
293
msgid "the truncate method now accepts a *size* argument."
299
- msgstr "truncate 메서드는 이제`` size`` 인자를 허용합니다."
294
+ msgstr "truncate 메서드는 이제* size* 인자를 허용합니다."
300
295
301
296
#: ../../library/tempfile.rst:172
302
297
msgid ""
@@ -306,29 +301,29 @@ msgid ""
306
301
msgstr ""
307
302
308
303
#: ../../library/tempfile.rst:180
309
- #, fuzzy
310
304
msgid ""
311
305
"This class securely creates a temporary directory using the same rules as"
312
306
" :func:`mkdtemp`. The resulting object can be used as a :term:`context "
313
307
"manager` (see :ref:`tempfile-examples`). On completion of the context or"
314
308
" destruction of the temporary directory object, the newly created "
315
309
"temporary directory and all its contents are removed from the filesystem."
316
310
msgstr ""
317
- "이 함수는 :func:`mkdtemp`\\ 와 같은 규칙을 사용하여 임시 디렉터리를 안전하게 만듭니다. 결과 객체는 컨텍스트 관리자로"
318
- " 사용할 수 있습니다 (:ref:`tempfile-examples`\\ 를 참조하십시오). 컨텍스트가 완료되거나 임시 디렉터리 객체가"
319
- " 파괴되면 새로 만들어진 임시 디렉터리와 모든 내용이 파일 시스템에서 제거됩니다."
311
+ "이 클래스는 :func:`mkdtemp`\\ 와 같은 규칙을 사용하여 임시 디렉터리를 안전하게 만듭니다. 결과 객체는 "
312
+ ":term:`컨텍스트 관리자 <context manager>`\\ 로 사용할 수 있습니다 (:ref:`tempfile-"
313
+ "examples`\\ 를 참조하십시오). 컨텍스트가 완료되거나 임시 디렉터리 객체가 파괴되면 새로 만들어진 임시 디렉터리와 모든 "
314
+ "내용이 파일 시스템에서 제거됩니다."
320
315
321
316
#: ../../library/tempfile.rst:188
322
- #, fuzzy
323
317
msgid ""
324
318
"The directory name can be retrieved from the :attr:`!name` attribute of "
325
319
"the returned object. When the returned object is used as a "
326
320
":term:`context manager`, the :attr:`!name` will be assigned to the target"
327
321
" of the :keyword:`!as` clause in the :keyword:`with` statement, if there "
328
322
"is one."
329
323
msgstr ""
330
- "반환된 객체의 :attr:`name` 어트리뷰트에서 디렉터리 이름을 꺼낼 수 있습니다. 반환된 객체가 컨텍스트 관리자로 사용될 때,"
331
- " :attr:`name`\\ 은 :keyword:`with` 문의 :keyword:`!as` 절의 대상에 (있다면) 대입됩니다."
324
+ "반환된 객체의 :attr:`!name` 어트리뷰트에서 디렉터리 이름을 꺼낼 수 있습니다. 반환된 객체가 :term:`컨텍스트 관리자"
325
+ " <context manager>`\\ 로 사용될 때, :attr:`!name`\\ 은 :keyword:`with` 문의 "
326
+ ":keyword:`!as` 절의 대상에 (있다면) 대입됩니다."
332
327
333
328
#: ../../library/tempfile.rst:195
334
329
msgid ""
@@ -360,14 +355,12 @@ msgstr ""
360
355
"발생시킵니다."
361
356
362
357
#: ../../library/tempfile.rst:214
363
- #, fuzzy
364
358
msgid "Added *ignore_cleanup_errors* parameter."
365
- msgstr "*errors * 매개 변수를 추가했습니다."
359
+ msgstr "*ignore_cleanup_errors * 매개 변수를 추가했습니다."
366
360
367
361
#: ../../library/tempfile.rst:217
368
- #, fuzzy
369
362
msgid "Added the *delete* parameter."
370
- msgstr "*errors * 매개 변수를 추가했습니다."
363
+ msgstr "*delete * 매개 변수를 추가했습니다."
371
364
372
365
#: ../../library/tempfile.rst:223
373
366
msgid ""
@@ -494,11 +487,10 @@ msgid ":func:`mkdtemp` returns the absolute pathname of the new directory."
494
487
msgstr ":func:`mkdtemp`\\ 는 새 디렉터리의 절대 경로명을 반환합니다."
495
488
496
489
#: ../../library/tempfile.rst:301
497
- #, fuzzy
498
490
msgid ""
499
491
":func:`mkdtemp` now always returns an absolute path, even if *dir* is "
500
492
"relative."
501
- msgstr ":func:`mkdtemp`\\ 는새 디렉터리의 절대경로명을 반환합니다."
493
+ msgstr "이제 *dir* \\ 이 상대 경로일 때도, :func:`mkdtemp`\\ 는항상 절대경로를 반환합니다."
502
494
503
495
#: ../../library/tempfile.rst:307
504
496
msgid ""
@@ -575,7 +567,6 @@ msgid "Same as :func:`gettempprefix` but the return value is in bytes."
575
567
msgstr ":func:`gettempprefix`\\ 와 같지만, 반환 값이 바이트열입니다."
576
568
577
569
#: ../../library/tempfile.rst:355
578
- #, fuzzy
579
570
msgid ""
580
571
"The module uses a global variable to store the name of the directory used"
581
572
" for temporary files returned by :func:`gettempdir`. It can be set "
@@ -586,16 +577,17 @@ msgid ""
586
577
msgstr ""
587
578
"모듈은 전역 변수를 사용하여 :func:`gettempdir`\\ 이 반환한 임시 파일에 사용되는 디렉터리의 이름을 저장합니다. 선택"
588
579
" 절차를 무시하도록 직접 설정할 수 있지만, 권장하지 않습니다. 이 모듈의 모든 함수는 디렉터리를 지정하는 데 사용할 수 있는 "
589
- "*dir* 인자를사용하며 이는 권장되는 방법입니다."
580
+ "*dir* 인자를사용합니다. 이는 전역 API 동작을 변경하여 주의하지 않는 다른 코드를 놀라게 하지 않도록 권장되는 방법입니다."
590
581
591
582
#: ../../library/tempfile.rst:364
592
- #, fuzzy
593
583
msgid ""
594
584
"When set to a value other than ``None``, this variable defines the "
595
585
"default value for the *dir* argument to the functions defined in this "
596
586
"module, including its type, bytes or str. It cannot be a :term:`path-"
597
587
"like object`."
598
- msgstr "``None`` 이외의 값으로 설정되면, 이 변수는 이 모듈에 정의된 함수의 *dir* 인자의 기본값을 정의합니다."
588
+ msgstr ""
589
+ "``None`` 이외의 값으로 설정되면, 이 변수는 이 모듈에 정의된 함수의 *dir* 인자의 기본값을 정의합니다 (형이 "
590
+ "바이트열인지 문자열인지도 정의합니다). :term:`경로류 객체 <path-like object>`\\ 일 수 없습니다."
599
591
600
592
#: ../../library/tempfile.rst:369
601
593
msgid ""
@@ -666,6 +658,45 @@ msgid ""
666
658
">>>\n"
667
659
"# directory and contents have been removed"
668
660
msgstr ""
661
+ ">>> import tempfile\n"
662
+ "\n"
663
+ "# 임시 파일을 만들고 약간의 데이터를 기록합니다\n"
664
+ ">>> fp = tempfile.TemporaryFile()\n"
665
+ ">>> fp.write(b'Hello world!')\n"
666
+ "# 파일에서 데이터를 읽습니다\n"
667
+ ">>> fp.seek(0)\n"
668
+ ">>> fp.read()\n"
669
+ "b'Hello world!'\n"
670
+ "# 파일을 닫습니다, 삭제됩니다\n"
671
+ ">>> fp.close()\n"
672
+ "\n"
673
+ "# 컨텍스트 관리자를 사용해서 임시 파일을 만듭니다\n"
674
+ ">>> with tempfile.TemporaryFile() as fp:\n"
675
+ "... fp.write(b'Hello world!')\n"
676
+ "... fp.seek(0)\n"
677
+ "... fp.read()\n"
678
+ "b'Hello world!'\n"
679
+ ">>>\n"
680
+ "# 파일은 이제 닫히고 삭제됩니다\n"
681
+ "\n"
682
+ "# 컨텍스트 관리자를 사용해서 임시 파일을 만듭니다\n"
683
+ "# 파일을 닫고, 이름을 사용해서 파일을 다십 엽니다\n"
684
+ ">>> with tempfile.NamedTemporaryFile(delete_on_close=False) as fp:\n"
685
+ "... fp.write(b'Hello world!')\n"
686
+ "... fp.close()\n"
687
+ "... # 파일은 닫히지만, 삭제되지는 않습니다\n"
688
+ "... # 이름을 사용해서 파일을 다시 엽니다\n"
689
+ "... with open(fp.name, mode='rb') as f:\n"
690
+ "... f.read()\n"
691
+ "b'Hello world!'\n"
692
+ ">>>\n"
693
+ "# 파일은 이제 삭제됩니다\n"
694
+ "\n"
695
+ "# 컨텍스트 관리자를 사용해서 임시 디렉터리를 만듭니다\n"
696
+ ">>> with tempfile.TemporaryDirectory() as tmpdirname:\n"
697
+ "... print('created temporary directory', tmpdirname)\n"
698
+ ">>>\n"
699
+ "# 디렉터리와 내용은 삭제되었습니다"
669
700
670
701
#: ../../library/tempfile.rst:433
671
702
msgid "Deprecated functions and variables"
@@ -726,18 +757,27 @@ msgid ""
726
757
">>> os.path.exists(f.name)\n"
727
758
"False"
728
759
msgstr ""
760
+ ">>> f = NamedTemporaryFile(delete=False)\n"
761
+ ">>> f.name\n"
762
+ "'/tmp/tmptjujjt'\n"
763
+ ">>> f.write(b\" Hello World!\\ n\" )\n"
764
+ "13\n"
765
+ ">>> f.close()\n"
766
+ ">>> os.unlink(f.name)\n"
767
+ ">>> os.path.exists(f.name)\n"
768
+ "False"
729
769
730
770
#: ../../library/tempfile.rst:11
731
771
msgid "temporary"
732
- msgstr ""
772
+ msgstr "임시 "
733
773
734
774
#: ../../library/tempfile.rst:11
735
775
msgid "file name"
736
- msgstr ""
776
+ msgstr "파일명 "
737
777
738
778
#: ../../library/tempfile.rst:11
739
779
msgid "file"
740
- msgstr ""
780
+ msgstr "파일 "
741
781
742
782
#~ msgid ""
743
783
#~ "This function operates exactly as "