forked from python/python-docs-zh-tw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathos.po
6661 lines (5626 loc) · 225 KB
/
os.po
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-19 00:15+0000\n"
"PO-Revision-Date: 2024-04-29 15:24+0800\n"
"Last-Translator: Adrian Liaw <[email protected]>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.4.2\n"
#: ../../library/os.rst:2
msgid ":mod:`!os` --- Miscellaneous operating system interfaces"
msgstr ":mod:`!os` --- 各種作業系統介面"
#: ../../library/os.rst:7
msgid "**Source code:** :source:`Lib/os.py`"
msgstr "**原始碼:**\\ :source:`Lib/os.py`"
#: ../../library/os.rst:11
msgid ""
"This module provides a portable way of using operating system dependent "
"functionality. If you just want to read or write a file see :func:`open`, "
"if you want to manipulate paths, see the :mod:`os.path` module, and if you "
"want to read all the lines in all the files on the command line see the :mod:"
"`fileinput` module. For creating temporary files and directories see the :"
"mod:`tempfile` module, and for high-level file and directory handling see "
"the :mod:`shutil` module."
msgstr ""
"該模組提供了一種便利的方式來操作與作業系統相關的功能。如果你想讀取或寫入檔"
"案,請參閱 :func:`open` ,如果你想操作檔案路徑,請參閱 :mod:`os.path` 模組,"
"如果你想透過命令列查看所有檔案中的所有內容,請查看 :mod:`fileinput` 模組。要"
"建立臨時檔案和目錄,請參閱 :mod:`tempfile` 模組,要操作高級檔案和目錄,請參"
"閱 :mod:`shutil` 模組。"
#: ../../library/os.rst:19
msgid "Notes on the availability of these functions:"
msgstr "關於這些功能的可用性說明:"
#: ../../library/os.rst:21
msgid ""
"The design of all built-in operating system dependent modules of Python is "
"such that as long as the same functionality is available, it uses the same "
"interface; for example, the function ``os.stat(path)`` returns stat "
"information about *path* in the same format (which happens to have "
"originated with the POSIX interface)."
msgstr ""
"Python 所有內建作業系統相關的模組設計是這樣:只要有相同的函式可使用,就會使用"
"相同的介面 (interface)。舉例來說,``os.stat(path)`` 函式會以相同格式回傳關"
"於 *path* 的統計資訊(這剛好來自於 POSIX 的介面。)。"
#: ../../library/os.rst:27
msgid ""
"Extensions peculiar to a particular operating system are also available "
"through the :mod:`os` module, but using them is of course a threat to "
"portability."
msgstr ""
"對於特定的作業系統獨有的擴充功能也可以透過 :mod:`os` 取得,但使用它們的時候對"
"於可移植性無疑會是個問題。"
#: ../../library/os.rst:31
msgid ""
"All functions accepting path or file names accept both bytes and string "
"objects, and result in an object of the same type, if a path or file name is "
"returned."
msgstr ""
"所有接受檔案路徑和檔案名稱的函式皆接受位元組 (bytes) 和字串物件 (string "
"objects),且如果回傳檔案路徑或檔案名稱,則會產出相同型別的物件。"
#: ../../library/os.rst:35
msgid ""
"On VxWorks, os.popen, os.fork, os.execv and os.spawn*p* are not supported."
msgstr "在 VxWorks, 不支援 os.popen、os.fork、os.execv 和 os.spawn*p*。"
#: ../../library/os.rst:37
msgid ""
"On WebAssembly platforms, Android and iOS, large parts of the :mod:`os` "
"module are not available or behave differently. APIs related to processes (e."
"g. :func:`~os.fork`, :func:`~os.execve`) and resources (e.g. :func:`~os."
"nice`) are not available. Others like :func:`~os.getuid` and :func:`~os."
"getpid` are emulated or stubs. WebAssembly platforms also lack support for "
"signals (e.g. :func:`~os.kill`, :func:`~os.wait`)."
msgstr ""
"在 WebAssembly 平台和 Android 與 iOS 上,大部分 :mod:`os` 模組無法使用或行為"
"不同。與行程 (process)(例如 :func:`~os.fork`、:func:`~os.execve`\\ )與資源"
"(例如 :func:`~os.nice`\\ )相關的 API 不可使用。其他諸如 :func:`~os.getuid` "
"和 :func:`~os.getpid` 的相關 API 是 emulated 或 stubs。WebAssembly 平台也缺少"
"訊號相關支援(例如 :func:`~os.kill`、:func:`~os.wait`\\ )。"
#: ../../library/os.rst:47
msgid ""
"All functions in this module raise :exc:`OSError` (or subclasses thereof) in "
"the case of invalid or inaccessible file names and paths, or other arguments "
"that have the correct type, but are not accepted by the operating system."
msgstr ""
"在檔案名稱和路徑找不到或無效的時候,或引數型別正確但作業系統不接受的時候,在"
"此模組中的所有的函式都會引發 :exc:`OSError`\\ (或其子類別)。"
#: ../../library/os.rst:53
msgid "An alias for the built-in :exc:`OSError` exception."
msgstr "內建例外 :exc:`OSError` 的別名。"
#: ../../library/os.rst:58
msgid ""
"The name of the operating system dependent module imported. The following "
"names have currently been registered: ``'posix'``, ``'nt'``, ``'java'``."
msgstr ""
#: ../../library/os.rst:63
msgid ""
":data:`sys.platform` has a finer granularity. :func:`os.uname` gives system-"
"dependent version information."
msgstr ""
#: ../../library/os.rst:66
msgid ""
"The :mod:`platform` module provides detailed checks for the system's "
"identity."
msgstr ""
#: ../../library/os.rst:74
msgid "File Names, Command Line Arguments, and Environment Variables"
msgstr ""
#: ../../library/os.rst:76
msgid ""
"In Python, file names, command line arguments, and environment variables are "
"represented using the string type. On some systems, decoding these strings "
"to and from bytes is necessary before passing them to the operating system. "
"Python uses the :term:`filesystem encoding and error handler` to perform "
"this conversion (see :func:`sys.getfilesystemencoding`)."
msgstr ""
#: ../../library/os.rst:82
msgid ""
"The :term:`filesystem encoding and error handler` are configured at Python "
"startup by the :c:func:`PyConfig_Read` function: see :c:member:`~PyConfig."
"filesystem_encoding` and :c:member:`~PyConfig.filesystem_errors` members of :"
"c:type:`PyConfig`."
msgstr ""
#: ../../library/os.rst:87
msgid ""
"On some systems, conversion using the file system encoding may fail. In this "
"case, Python uses the :ref:`surrogateescape encoding error handler "
"<surrogateescape>`, which means that undecodable bytes are replaced by a "
"Unicode character U+DC\\ *xx* on decoding, and these are again translated to "
"the original byte on encoding."
msgstr ""
#: ../../library/os.rst:95
msgid ""
"The :term:`file system encoding <filesystem encoding and error handler>` "
"must guarantee to successfully decode all bytes below 128. If the file "
"system encoding fails to provide this guarantee, API functions can raise :"
"exc:`UnicodeError`."
msgstr ""
#: ../../library/os.rst:100
msgid "See also the :term:`locale encoding`."
msgstr "另請參閱 :term:`locale encoding`。"
#: ../../library/os.rst:106
msgid "Python UTF-8 Mode"
msgstr "Python UTF-8 模式"
#: ../../library/os.rst:108
msgid "See :pep:`540` for more details."
msgstr "更多資訊請見 :pep:`540`。"
#: ../../library/os.rst:111
msgid ""
"The Python UTF-8 Mode ignores the :term:`locale encoding` and forces the "
"usage of the UTF-8 encoding:"
msgstr ""
"Python 在 UTF-8 模式下會忽略 :term:`locale encoding` 並且強制使用 UTF-8 去編"
"碼:"
#: ../../library/os.rst:114
msgid ""
"Use UTF-8 as the :term:`filesystem encoding <filesystem encoding and error "
"handler>`."
msgstr ""
#: ../../library/os.rst:116
msgid ":func:`sys.getfilesystemencoding` returns ``'utf-8'``."
msgstr ":func:`sys.getfilesystemencoding` 回傳 ``'utf-8'``。"
#: ../../library/os.rst:117
msgid ""
":func:`locale.getpreferredencoding` returns ``'utf-8'`` (the *do_setlocale* "
"argument has no effect)."
msgstr ""
":func:`locale.getpreferredencoding` 回傳 ``'utf-8'``\\ (*do_setlocale* "
"引數並無任何效果)。"
#: ../../library/os.rst:119
msgid ""
":data:`sys.stdin`, :data:`sys.stdout`, and :data:`sys.stderr` all use UTF-8 "
"as their text encoding, with the ``surrogateescape`` :ref:`error handler "
"<error-handlers>` being enabled for :data:`sys.stdin` and :data:`sys.stdout` "
"(:data:`sys.stderr` continues to use ``backslashreplace`` as it does in the "
"default locale-aware mode)"
msgstr ""
#: ../../library/os.rst:124
msgid ""
"On Unix, :func:`os.device_encoding` returns ``'utf-8'`` rather than the "
"device encoding."
msgstr ""
"在 Unix 中,:func:`os.device_encoding` 回傳 ``'utf-8'`` 而非"
"裝置編碼。"
#: ../../library/os.rst:127
msgid ""
"Note that the standard stream settings in UTF-8 mode can be overridden by :"
"envvar:`PYTHONIOENCODING` (just as they can be in the default locale-aware "
"mode)."
msgstr ""
"請注意,在 UTF-8 模式中,標準的串流設定會被 "
":envvar:`PYTHONIOENCODING` 覆蓋(如同在預設在地化覺察 "
"模式一樣)。"
#: ../../library/os.rst:131
msgid ""
"As a consequence of the changes in those lower level APIs, other higher "
"level APIs also exhibit different default behaviours:"
msgstr ""
#: ../../library/os.rst:134
msgid ""
"Command line arguments, environment variables and filenames are decoded to "
"text using the UTF-8 encoding."
msgstr ""
"命令列引數、環境變數及檔案名稱會以 UTF-8 編碼形式來被解碼成文字。"
#: ../../library/os.rst:136
msgid ":func:`os.fsdecode` and :func:`os.fsencode` use the UTF-8 encoding."
msgstr ""
":func:`os.fsdecode` 和 :func:`os.fsencode` 使用 UTF-8 編碼。"
#: ../../library/os.rst:137
msgid ""
":func:`open`, :func:`io.open`, and :func:`codecs.open` use the UTF-8 "
"encoding by default. However, they still use the strict error handler by "
"default so that attempting to open a binary file in text mode is likely to "
"raise an exception rather than producing nonsense data."
msgstr ""
#: ../../library/os.rst:142
msgid ""
"The :ref:`Python UTF-8 Mode <utf8-mode>` is enabled if the LC_CTYPE locale "
"is ``C`` or ``POSIX`` at Python startup (see the :c:func:`PyConfig_Read` "
"function)."
msgstr ""
#: ../../library/os.rst:146
msgid ""
"It can be enabled or disabled using the :option:`-X utf8 <-X>` command line "
"option and the :envvar:`PYTHONUTF8` environment variable."
msgstr ""
#: ../../library/os.rst:149
msgid ""
"If the :envvar:`PYTHONUTF8` environment variable is not set at all, then the "
"interpreter defaults to using the current locale settings, *unless* the "
"current locale is identified as a legacy ASCII-based locale (as described "
"for :envvar:`PYTHONCOERCECLOCALE`), and locale coercion is either disabled "
"or fails. In such legacy locales, the interpreter will default to enabling "
"UTF-8 mode unless explicitly instructed not to do so."
msgstr ""
#: ../../library/os.rst:156
msgid ""
"The Python UTF-8 Mode can only be enabled at the Python startup. Its value "
"can be read from :data:`sys.flags.utf8_mode <sys.flags>`."
msgstr ""
#: ../../library/os.rst:159
msgid ""
"See also the :ref:`UTF-8 mode on Windows <win-utf8-mode>` and the :term:"
"`filesystem encoding and error handler`."
msgstr ""
#: ../../library/os.rst:164
msgid ":pep:`686`"
msgstr ":pep:`686`"
#: ../../library/os.rst:165
msgid "Python 3.15 will make :ref:`utf8-mode` default."
msgstr "Python 3.15 預設使用 :ref:`utf8-mode`"
#: ../../library/os.rst:171
msgid "Process Parameters"
msgstr "行程參數"
#: ../../library/os.rst:173
msgid ""
"These functions and data items provide information and operate on the "
"current process and user."
msgstr ""
#: ../../library/os.rst:179
msgid ""
"Return the filename corresponding to the controlling terminal of the process."
msgstr ""
#: ../../library/os.rst:181 ../../library/os.rst:322 ../../library/os.rst:337
#: ../../library/os.rst:358 ../../library/os.rst:367 ../../library/os.rst:376
#: ../../library/os.rst:389 ../../library/os.rst:398 ../../library/os.rst:426
#: ../../library/os.rst:434 ../../library/os.rst:442 ../../library/os.rst:462
#: ../../library/os.rst:480 ../../library/os.rst:491 ../../library/os.rst:503
#: ../../library/os.rst:512 ../../library/os.rst:522 ../../library/os.rst:533
#: ../../library/os.rst:545 ../../library/os.rst:579 ../../library/os.rst:586
#: ../../library/os.rst:593 ../../library/os.rst:602 ../../library/os.rst:639
#: ../../library/os.rst:652 ../../library/os.rst:661 ../../library/os.rst:678
#: ../../library/os.rst:687 ../../library/os.rst:694 ../../library/os.rst:703
#: ../../library/os.rst:712 ../../library/os.rst:719 ../../library/os.rst:726
#: ../../library/os.rst:735 ../../library/os.rst:792 ../../library/os.rst:831
#: ../../library/os.rst:953 ../../library/os.rst:979 ../../library/os.rst:992
#: ../../library/os.rst:1009 ../../library/os.rst:1027
#: ../../library/os.rst:1038 ../../library/os.rst:1061
#: ../../library/os.rst:1082 ../../library/os.rst:1094
#: ../../library/os.rst:1105 ../../library/os.rst:1118
#: ../../library/os.rst:1139 ../../library/os.rst:1160
#: ../../library/os.rst:1172 ../../library/os.rst:1183
#: ../../library/os.rst:1244 ../../library/os.rst:1367
#: ../../library/os.rst:1379 ../../library/os.rst:1393
#: ../../library/os.rst:1403 ../../library/os.rst:1418
#: ../../library/os.rst:1433 ../../library/os.rst:1446
#: ../../library/os.rst:1463 ../../library/os.rst:1489
#: ../../library/os.rst:1506 ../../library/os.rst:1520
#: ../../library/os.rst:1535 ../../library/os.rst:1547
#: ../../library/os.rst:1574 ../../library/os.rst:1586
#: ../../library/os.rst:1596 ../../library/os.rst:1610
#: ../../library/os.rst:1662 ../../library/os.rst:1682
#: ../../library/os.rst:1691 ../../library/os.rst:1703
#: ../../library/os.rst:1738 ../../library/os.rst:1762
#: ../../library/os.rst:1772 ../../library/os.rst:1780
#: ../../library/os.rst:1789 ../../library/os.rst:1800
#: ../../library/os.rst:1837 ../../library/os.rst:1864
#: ../../library/os.rst:1915 ../../library/os.rst:1921
#: ../../library/os.rst:2087 ../../library/os.rst:2164
#: ../../library/os.rst:2181 ../../library/os.rst:2195
#: ../../library/os.rst:2221 ../../library/os.rst:2239
#: ../../library/os.rst:2255 ../../library/os.rst:2271
#: ../../library/os.rst:2334 ../../library/os.rst:2358
#: ../../library/os.rst:2378 ../../library/os.rst:2514
#: ../../library/os.rst:2536 ../../library/os.rst:2580
#: ../../library/os.rst:2592 ../../library/os.rst:2614
#: ../../library/os.rst:3322 ../../library/os.rst:3456
#: ../../library/os.rst:3479 ../../library/os.rst:3493
#: ../../library/os.rst:3713 ../../library/os.rst:3738
#: ../../library/os.rst:3763 ../../library/os.rst:3817
#: ../../library/os.rst:3826 ../../library/os.rst:3835
#: ../../library/os.rst:3843 ../../library/os.rst:3852
#: ../../library/os.rst:3861 ../../library/os.rst:3933
#: ../../library/os.rst:3996 ../../library/os.rst:4006
#: ../../library/os.rst:4024 ../../library/os.rst:4033
#: ../../library/os.rst:4043 ../../library/os.rst:4053
#: ../../library/os.rst:4063 ../../library/os.rst:4074
#: ../../library/os.rst:4219 ../../library/os.rst:4288
#: ../../library/os.rst:4323 ../../library/os.rst:4331
#: ../../library/os.rst:4338 ../../library/os.rst:4345
#: ../../library/os.rst:4352 ../../library/os.rst:4359
#: ../../library/os.rst:4366 ../../library/os.rst:4373
#: ../../library/os.rst:4381 ../../library/os.rst:4389
#: ../../library/os.rst:4396 ../../library/os.rst:4403
#: ../../library/os.rst:4412 ../../library/os.rst:4420
#: ../../library/os.rst:4428 ../../library/os.rst:4435
#: ../../library/os.rst:4442 ../../library/os.rst:4491
#: ../../library/os.rst:4518 ../../library/os.rst:4541
#: ../../library/os.rst:4557 ../../library/os.rst:4564
#: ../../library/os.rst:4575 ../../library/os.rst:4585
#: ../../library/os.rst:4594 ../../library/os.rst:4626
#: ../../library/os.rst:4734 ../../library/os.rst:4750
#: ../../library/os.rst:4783 ../../library/os.rst:4852
#: ../../library/os.rst:4871 ../../library/os.rst:4882
#: ../../library/os.rst:4894 ../../library/os.rst:4939
#: ../../library/os.rst:4976 ../../library/os.rst:4999
#: ../../library/os.rst:5020 ../../library/os.rst:5054
#: ../../library/os.rst:5095 ../../library/os.rst:5115
#: ../../library/os.rst:5129 ../../library/os.rst:5146
#: ../../library/os.rst:5161 ../../library/os.rst:5172
#: ../../library/os.rst:5184 ../../library/os.rst:5197
#: ../../library/os.rst:5206 ../../library/os.rst:5216
#: ../../library/os.rst:5229 ../../library/os.rst:5264
#: ../../library/os.rst:5280 ../../library/os.rst:5291
#: ../../library/os.rst:5303 ../../library/os.rst:5310
#: ../../library/os.rst:5319 ../../library/os.rst:5328
#: ../../library/os.rst:5337 ../../library/os.rst:5346
#: ../../library/os.rst:5498 ../../library/os.rst:5507
#: ../../library/os.rst:5531 ../../library/os.rst:5558
#: ../../library/os.rst:5567 ../../library/os.rst:5690
msgid "Availability"
msgstr ""
#: ../../library/os.rst:186
msgid ""
"A :term:`mapping` object where keys and values are strings that represent "
"the process environment. For example, ``environ['HOME']`` is the pathname "
"of your home directory (on some platforms), and is equivalent to "
"``getenv(\"HOME\")`` in C."
msgstr ""
#: ../../library/os.rst:191
msgid ""
"This mapping is captured the first time the :mod:`os` module is imported, "
"typically during Python startup as part of processing :file:`site.py`. "
"Changes to the environment made after this time are not reflected in :data:"
"`os.environ`, except for changes made by modifying :data:`os.environ` "
"directly."
msgstr ""
#: ../../library/os.rst:196
msgid ""
"This mapping may be used to modify the environment as well as query the "
"environment. :func:`putenv` will be called automatically when the mapping "
"is modified."
msgstr ""
#: ../../library/os.rst:200
msgid ""
"On Unix, keys and values use :func:`sys.getfilesystemencoding` and "
"``'surrogateescape'`` error handler. Use :data:`environb` if you would like "
"to use a different encoding."
msgstr ""
#: ../../library/os.rst:204
msgid ""
"On Windows, the keys are converted to uppercase. This also applies when "
"getting, setting, or deleting an item. For example, ``environ['monty'] = "
"'python'`` maps the key ``'MONTY'`` to the value ``'python'``."
msgstr ""
#: ../../library/os.rst:211
msgid ""
"Calling :func:`putenv` directly does not change :data:`os.environ`, so it's "
"better to modify :data:`os.environ`."
msgstr ""
"呼叫 :func:`putenv` 並不會改變 :data:`os.environ`,"
"所以建議直接修改 :data:`os.environ`。"
#: ../../library/os.rst:216
msgid ""
"On some platforms, including FreeBSD and macOS, setting ``environ`` may "
"cause memory leaks. Refer to the system documentation for :c:func:`!putenv`."
msgstr ""
#: ../../library/os.rst:220
msgid ""
"You can delete items in this mapping to unset environment variables. :func:"
"`unsetenv` will be called automatically when an item is deleted from :data:"
"`os.environ`, and when one of the :meth:`pop` or :meth:`clear` methods is "
"called."
msgstr ""
#: ../../library/os.rst:225 ../../library/os.rst:241
msgid ""
"Updated to support :pep:`584`'s merge (``|``) and update (``|=``) operators."
msgstr ""
#: ../../library/os.rst:231
msgid ""
"Bytes version of :data:`environ`: a :term:`mapping` object where both keys "
"and values are :class:`bytes` objects representing the process environment. :"
"data:`environ` and :data:`environb` are synchronized (modifying :data:"
"`environb` updates :data:`environ`, and vice versa)."
msgstr ""
#: ../../library/os.rst:236
msgid ""
":data:`environb` is only available if :const:`supports_bytes_environ` is "
"``True``."
msgstr ""
#: ../../library/os.rst:250
msgid "These functions are described in :ref:`os-file-dir`."
msgstr ""
#: ../../library/os.rst:255
msgid ""
"Encode :term:`path-like <path-like object>` *filename* to the :term:"
"`filesystem encoding and error handler`; return :class:`bytes` unchanged."
msgstr ""
#: ../../library/os.rst:259
msgid ":func:`fsdecode` is the reverse function."
msgstr ""
#: ../../library/os.rst:263 ../../library/os.rst:278
msgid ""
"Support added to accept objects implementing the :class:`os.PathLike` "
"interface."
msgstr ""
#: ../../library/os.rst:270
msgid ""
"Decode the :term:`path-like <path-like object>` *filename* from the :term:"
"`filesystem encoding and error handler`; return :class:`str` unchanged."
msgstr ""
#: ../../library/os.rst:274
msgid ":func:`fsencode` is the reverse function."
msgstr ""
#: ../../library/os.rst:285
msgid "Return the file system representation of the path."
msgstr ""
#: ../../library/os.rst:287
msgid ""
"If :class:`str` or :class:`bytes` is passed in, it is returned unchanged. "
"Otherwise :meth:`~os.PathLike.__fspath__` is called and its value is "
"returned as long as it is a :class:`str` or :class:`bytes` object. In all "
"other cases, :exc:`TypeError` is raised."
msgstr ""
#: ../../library/os.rst:297
msgid ""
"An :term:`abstract base class` for objects representing a file system path, "
"e.g. :class:`pathlib.PurePath`."
msgstr ""
#: ../../library/os.rst:304
msgid "Return the file system path representation of the object."
msgstr ""
#: ../../library/os.rst:306
msgid ""
"The method should only return a :class:`str` or :class:`bytes` object, with "
"the preference being for :class:`str`."
msgstr ""
#: ../../library/os.rst:312
msgid ""
"Return the value of the environment variable *key* as a string if it exists, "
"or *default* if it doesn't. *key* is a string. Note that since :func:"
"`getenv` uses :data:`os.environ`, the mapping of :func:`getenv` is similarly "
"also captured on import, and the function may not reflect future environment "
"changes."
msgstr ""
#: ../../library/os.rst:318
msgid ""
"On Unix, keys and values are decoded with :func:`sys.getfilesystemencoding` "
"and ``'surrogateescape'`` error handler. Use :func:`os.getenvb` if you would "
"like to use a different encoding."
msgstr ""
#: ../../library/os.rst:327
msgid ""
"Return the value of the environment variable *key* as bytes if it exists, or "
"*default* if it doesn't. *key* must be bytes. Note that since :func:"
"`getenvb` uses :data:`os.environb`, the mapping of :func:`getenvb` is "
"similarly also captured on import, and the function may not reflect future "
"environment changes."
msgstr ""
#: ../../library/os.rst:334
msgid ""
":func:`getenvb` is only available if :const:`supports_bytes_environ` is "
"``True``."
msgstr ""
#: ../../library/os.rst:344
msgid ""
"Returns the list of directories that will be searched for a named "
"executable, similar to a shell, when launching a process. *env*, when "
"specified, should be an environment variable dictionary to lookup the PATH "
"in. By default, when *env* is ``None``, :data:`environ` is used."
msgstr ""
#: ../../library/os.rst:355
msgid ""
"Return the effective group id of the current process. This corresponds to "
"the \"set id\" bit on the file being executed in the current process."
msgstr ""
#: ../../library/os.rst:365
msgid "Return the current process's effective user id."
msgstr ""
#: ../../library/os.rst:374
msgid "Return the real group id of the current process."
msgstr ""
#: ../../library/os.rst:378 ../../library/os.rst:451 ../../library/os.rst:535
#: ../../library/os.rst:758
msgid ""
"The function is a stub on WASI, see :ref:`wasm-availability` for more "
"information."
msgstr ""
#: ../../library/os.rst:384
msgid ""
"Return list of group ids that *user* belongs to. If *group* is not in the "
"list, it is included; typically, *group* is specified as the group ID field "
"from the password record for *user*, because that group ID will otherwise be "
"potentially omitted."
msgstr ""
#: ../../library/os.rst:396
msgid ""
"Return list of supplemental group ids associated with the current process."
msgstr ""
#: ../../library/os.rst:402
msgid ""
"On macOS, :func:`getgroups` behavior differs somewhat from other Unix "
"platforms. If the Python interpreter was built with a deployment target of "
"``10.5`` or earlier, :func:`getgroups` returns the list of effective group "
"ids associated with the current user process; this list is limited to a "
"system-defined number of entries, typically 16, and may be modified by calls "
"to :func:`setgroups` if suitably privileged. If built with a deployment "
"target greater than ``10.5``, :func:`getgroups` returns the current group "
"access list for the user associated with the effective user id of the "
"process; the group access list may change over the lifetime of the process, "
"it is not affected by calls to :func:`setgroups`, and its length is not "
"limited to 16. The deployment target value, :const:"
"`MACOSX_DEPLOYMENT_TARGET`, can be obtained with :func:`sysconfig."
"get_config_var`."
msgstr ""
#: ../../library/os.rst:419
msgid ""
"Return the name of the user logged in on the controlling terminal of the "
"process. For most purposes, it is more useful to use :func:`getpass."
"getuser` since the latter checks the environment variables :envvar:`LOGNAME` "
"or :envvar:`USERNAME` to find out who the user is, and falls back to ``pwd."
"getpwuid(os.getuid())[0]`` to get the login name of the current real user id."
msgstr ""
#: ../../library/os.rst:431
msgid ""
"Return the process group id of the process with process id *pid*. If *pid* "
"is 0, the process group id of the current process is returned."
msgstr ""
#: ../../library/os.rst:440
msgid "Return the id of the current process group."
msgstr ""
#: ../../library/os.rst:449
msgid "Return the current process id."
msgstr ""
#: ../../library/os.rst:458
msgid ""
"Return the parent's process id. When the parent process has exited, on Unix "
"the id returned is the one of the init process (1), on Windows it is still "
"the same id, which may be already reused by another process."
msgstr ""
#: ../../library/os.rst:464
msgid "Added support for Windows."
msgstr "新增對 Windows 的支援。"
#: ../../library/os.rst:472
msgid ""
"Get program scheduling priority. The value *which* is one of :const:"
"`PRIO_PROCESS`, :const:`PRIO_PGRP`, or :const:`PRIO_USER`, and *who* is "
"interpreted relative to *which* (a process identifier for :const:"
"`PRIO_PROCESS`, process group identifier for :const:`PRIO_PGRP`, and a user "
"ID for :const:`PRIO_USER`). A zero value for *who* denotes (respectively) "
"the calling process, the process group of the calling process, or the real "
"user ID of the calling process."
msgstr ""
#: ../../library/os.rst:489 ../../library/os.rst:501
msgid ""
"Parameters for the :func:`getpriority` and :func:`setpriority` functions."
msgstr ""
#: ../../library/os.rst:509
msgid ""
"Return a tuple (ruid, euid, suid) denoting the current process's real, "
"effective, and saved user ids."
msgstr ""
#: ../../library/os.rst:519
msgid ""
"Return a tuple (rgid, egid, sgid) denoting the current process's real, "
"effective, and saved group ids."
msgstr ""
#: ../../library/os.rst:531
msgid "Return the current process's real user id."
msgstr ""
#: ../../library/os.rst:541
msgid ""
"Call the system initgroups() to initialize the group access list with all of "
"the groups of which the specified username is a member, plus the specified "
"group id."
msgstr ""
#: ../../library/os.rst:554
msgid ""
"Set the environment variable named *key* to the string *value*. Such "
"changes to the environment affect subprocesses started with :func:`os."
"system`, :func:`popen` or :func:`fork` and :func:`execv`."
msgstr ""
#: ../../library/os.rst:558
msgid ""
"Assignments to items in :data:`os.environ` are automatically translated into "
"corresponding calls to :func:`putenv`; however, calls to :func:`putenv` "
"don't update :data:`os.environ`, so it is actually preferable to assign to "
"items of :data:`os.environ`. This also applies to :func:`getenv` and :func:"
"`getenvb`, which respectively use :data:`os.environ` and :data:`os.environb` "
"in their implementations."
msgstr ""
#: ../../library/os.rst:566
msgid ""
"On some platforms, including FreeBSD and macOS, setting ``environ`` may "
"cause memory leaks. Refer to the system documentation for :c:func:`!putenv`."
msgstr ""
#: ../../library/os.rst:569
msgid ""
"Raises an :ref:`auditing event <auditing>` ``os.putenv`` with arguments "
"``key``, ``value``."
msgstr ""
"引發一個附帶引數 ``key``、``value`` 的\\ :ref:`稽核事件 <auditing>` ``os."
"putenv``。"
#: ../../library/os.rst:571
msgid "The function is now always available."
msgstr ""
"此函式現在都會是可用的。"
#: ../../library/os.rst:577
msgid "Set the current process's effective group id."
msgstr ""
#: ../../library/os.rst:584
msgid "Set the current process's effective user id."
msgstr ""
#: ../../library/os.rst:591
msgid "Set the current process' group id."
msgstr ""
#: ../../library/os.rst:598
msgid ""
"Set the list of supplemental group ids associated with the current process "
"to *groups*. *groups* must be a sequence, and each element must be an "
"integer identifying a group. This operation is typically available only to "
"the superuser."
msgstr ""
#: ../../library/os.rst:604
msgid ""
"On macOS, the length of *groups* may not exceed the system-defined maximum "
"number of effective group ids, typically 16. See the documentation for :func:"
"`getgroups` for cases where it may not return the same group list set by "
"calling setgroups()."
msgstr ""
#: ../../library/os.rst:611
msgid ""
"Reassociate the current thread with a Linux namespace. See the :manpage:"
"`setns(2)` and :manpage:`namespaces(7)` man pages for more details."
msgstr ""
#: ../../library/os.rst:615
msgid ""
"If *fd* refers to a :file:`/proc/{pid}/ns/` link, ``setns()`` reassociates "
"the calling thread with the namespace associated with that link, and "
"*nstype* may be set to one of the :ref:`CLONE_NEW* constants <os-unshare-"
"clone-flags>` to impose constraints on the operation (``0`` means no "
"constraints)."
msgstr ""
#: ../../library/os.rst:622
msgid ""
"Since Linux 5.8, *fd* may refer to a PID file descriptor obtained from :func:"
"`~os.pidfd_open`. In this case, ``setns()`` reassociates the calling thread "
"into one or more of the same namespaces as the thread referred to by *fd*. "
"This is subject to any constraints imposed by *nstype*, which is a bit mask "
"combining one or more of the :ref:`CLONE_NEW* constants <os-unshare-clone-"
"flags>`, e.g. ``setns(fd, os.CLONE_NEWUTS | os.CLONE_NEWPID)``. The caller's "
"memberships in unspecified namespaces are left unchanged."
msgstr ""
#: ../../library/os.rst:631
msgid ""
"*fd* can be any object with a :meth:`~io.IOBase.fileno` method, or a raw "
"file descriptor."
msgstr ""
#: ../../library/os.rst:633
msgid ""
"This example reassociates the thread with the ``init`` process's network "
"namespace::"
msgstr ""
#: ../../library/os.rst:635
msgid ""
"fd = os.open(\"/proc/1/ns/net\", os.O_RDONLY)\n"
"os.setns(fd, os.CLONE_NEWNET)\n"
"os.close(fd)"
msgstr ""
"fd = os.open(\"/proc/1/ns/net\", os.O_RDONLY)\n"
"os.setns(fd, os.CLONE_NEWNET)\n"
"os.close(fd)"
#: ../../library/os.rst:645
msgid "The :func:`~os.unshare` function."
msgstr ":func:`~os.unshare` 函式。"
#: ../../library/os.rst:649
msgid ""
"Call the system call :c:func:`!setpgrp` or ``setpgrp(0, 0)`` depending on "
"which version is implemented (if any). See the Unix manual for the "
"semantics."
msgstr ""
#: ../../library/os.rst:657
msgid ""
"Call the system call :c:func:`!setpgid` to set the process group id of the "
"process with id *pid* to the process group with id *pgrp*. See the Unix "
"manual for the semantics."
msgstr ""
#: ../../library/os.rst:668
msgid ""
"Set program scheduling priority. The value *which* is one of :const:"
"`PRIO_PROCESS`, :const:`PRIO_PGRP`, or :const:`PRIO_USER`, and *who* is "
"interpreted relative to *which* (a process identifier for :const:"
"`PRIO_PROCESS`, process group identifier for :const:`PRIO_PGRP`, and a user "
"ID for :const:`PRIO_USER`). A zero value for *who* denotes (respectively) "
"the calling process, the process group of the calling process, or the real "
"user ID of the calling process. *priority* is a value in the range -20 to "
"19. The default priority is 0; lower priorities cause more favorable "
"scheduling."
msgstr ""
#: ../../library/os.rst:685
msgid "Set the current process's real and effective group ids."
msgstr ""
#: ../../library/os.rst:692
msgid "Set the current process's real, effective, and saved group ids."
msgstr ""
#: ../../library/os.rst:701
msgid "Set the current process's real, effective, and saved user ids."
msgstr ""
#: ../../library/os.rst:710
msgid "Set the current process's real and effective user ids."
msgstr ""
#: ../../library/os.rst:717
msgid ""
"Call the system call :c:func:`!getsid`. See the Unix manual for the "
"semantics."
msgstr ""
#: ../../library/os.rst:724
msgid ""
"Call the system call :c:func:`!setsid`. See the Unix manual for the "
"semantics."
msgstr ""
#: ../../library/os.rst:733
msgid "Set the current process's user id."
msgstr ""
#: ../../library/os.rst:741
msgid ""
"Return the error message corresponding to the error code in *code*. On "
"platforms where :c:func:`!strerror` returns ``NULL`` when given an unknown "
"error number, :exc:`ValueError` is raised."
msgstr ""
#: ../../library/os.rst:748
msgid ""
"``True`` if the native OS type of the environment is bytes (eg. ``False`` on "
"Windows)."
msgstr ""
#: ../../library/os.rst:756
msgid "Set the current numeric umask and return the previous umask."
msgstr ""
#: ../../library/os.rst:768
msgid ""
"Returns information identifying the current operating system. The return "
"value is an object with five attributes:"
msgstr ""
#: ../../library/os.rst:771
msgid ":attr:`sysname` - operating system name"
msgstr ":attr:`sysname` - 作業系統名稱"
#: ../../library/os.rst:772
msgid ":attr:`nodename` - name of machine on network (implementation-defined)"
msgstr ""
#: ../../library/os.rst:773
msgid ":attr:`release` - operating system release"
msgstr ""
#: ../../library/os.rst:774
msgid ":attr:`version` - operating system version"
msgstr ":attr:`version` - 作業系統版本"
#: ../../library/os.rst:775
msgid ":attr:`machine` - hardware identifier"
msgstr ""
#: ../../library/os.rst:777
msgid ""
"For backwards compatibility, this object is also iterable, behaving like a "
"five-tuple containing :attr:`sysname`, :attr:`nodename`, :attr:`release`, :"
"attr:`version`, and :attr:`machine` in that order."
msgstr ""
#: ../../library/os.rst:782
msgid ""
"Some systems truncate :attr:`nodename` to 8 characters or to the leading "
"component; a better way to get the hostname is :func:`socket.gethostname` "
"or even ``socket.gethostbyaddr(socket.gethostname())``."
msgstr ""
#: ../../library/os.rst:787
msgid ""
"On macOS, iOS and Android, this returns the *kernel* name and version (i.e., "
"``'Darwin'`` on macOS and iOS; ``'Linux'`` on Android). :func:`platform."
"uname` can be used to get the user-facing operating system name and version "
"on iOS and Android."
msgstr ""
#: ../../library/os.rst:794 ../../library/os.rst:5001
msgid ""
"Return type changed from a tuple to a tuple-like object with named "
"attributes."
msgstr ""
#: ../../library/os.rst:803
msgid ""
"Unset (delete) the environment variable named *key*. Such changes to the "
"environment affect subprocesses started with :func:`os.system`, :func:"
"`popen` or :func:`fork` and :func:`execv`."
msgstr ""
#: ../../library/os.rst:807
msgid ""
"Deletion of items in :data:`os.environ` is automatically translated into a "
"corresponding call to :func:`unsetenv`; however, calls to :func:`unsetenv` "
"don't update :data:`os.environ`, so it is actually preferable to delete "
"items of :data:`os.environ`."
msgstr ""
#: ../../library/os.rst:812
msgid ""
"Raises an :ref:`auditing event <auditing>` ``os.unsetenv`` with argument "
"``key``."
msgstr ""
"引發一個附帶引數 ``key`` 的\\ :ref:`稽核事件 <auditing>` ``os.unsetenv``。"
#: ../../library/os.rst:814
msgid "The function is now always available and is also available on Windows."
msgstr ""
#: ../../library/os.rst:820
msgid ""
"Disassociate parts of the process execution context, and move them into a "
"newly created namespace. See the :manpage:`unshare(2)` man page for more "
"details. The *flags* argument is a bit mask, combining zero or more of the :"
"ref:`CLONE_* constants <os-unshare-clone-flags>`, that specifies which parts "
"of the execution context should be unshared from their existing associations "
"and moved to a new namespace. If the *flags* argument is ``0``, no changes "
"are made to the calling process's execution context."
msgstr ""
#: ../../library/os.rst:837
msgid "The :func:`~os.setns` function."
msgstr ":func:`~os.setns` 函式。"
#: ../../library/os.rst:841
msgid ""
"Flags to the :func:`unshare` function, if the implementation supports them. "
"See :manpage:`unshare(2)` in the Linux manual for their exact effect and "
"availability."
msgstr ""