@@ -34,7 +34,6 @@ msgid "General Library Questions"
34
34
msgstr "常見函式問題"
35
35
36
36
#: ../../faq/library.rst:15
37
- #, fuzzy
38
37
msgid "How do I find a module or application to perform task X?"
39
38
msgstr "我如何找到執行任務 X 的模組或應用程式?"
40
39
@@ -94,10 +93,7 @@ msgstr "用 C 編寫並動態載入的模組(.dll、.pyd、.so、.sl 等);
94
93
msgid ""
95
94
"modules written in C and linked with the interpreter; to get a list of "
96
95
"these, type::"
97
- msgstr ""
98
- "用 C 編寫並與直譯器鏈接的模組;要獲得這些 list,請輸入:\n"
99
- "\n"
100
- "::"
96
+ msgstr "用 C 編寫並與直譯器鏈接的模組;要獲得這些 list,請輸入: ::"
101
97
102
98
#: ../../faq/library.rst:47
103
99
msgid "How do I make a Python script executable on Unix?"
@@ -127,10 +123,7 @@ msgstr ""
127
123
msgid ""
128
124
"The second can be done in a number of ways. The most straightforward way is "
129
125
"to write ::"
130
- msgstr ""
131
- "第二個可以通過多種方式完成。最直接的方法是寫:\n"
132
- "\n"
133
- "::"
126
+ msgstr "第二個可以通過多種方式完成。最直接的方法是寫: ::"
134
127
135
128
#: ../../faq/library.rst:61
136
129
#, fuzzy
@@ -149,9 +142,7 @@ msgid ""
149
142
msgstr ""
150
143
"如果你希望腳本獨立於 Python 直譯器所在的位置,你可以使用 :program:`env` 程"
151
144
"式。幾乎所有 Unix 變體都支援以下內容,假設 Python 直譯器位於使用者的 :envvar:"
152
- "`PATH` 上的目錄中:\n"
153
- "\n"
154
- "::"
145
+ "`PATH` 上的目錄中: ::"
155
146
156
147
#: ../../faq/library.rst:71
157
148
#, fuzzy
@@ -179,9 +170,8 @@ msgid ""
179
170
"The minor disadvantage is that this defines the script's __doc__ string. "
180
171
"However, you can fix that by adding ::"
181
172
msgstr ""
182
- "次要缺點是這定義了腳本的 __doc__ 字串。但是,你可以通過新增來解決這個問題:\n"
183
- "\n"
184
- "::"
173
+ "次要缺點是這定義了腳本的 __doc__ 字串。但是,你可以通過新增來解決這個問"
174
+ "題: ::"
185
175
186
176
#: ../../faq/library.rst:94
187
177
msgid "Is there a curses/termcap package for Python?"
@@ -236,18 +226,12 @@ msgstr "為什麼我的信號處理程式不起作用?"
236
226
msgid ""
237
227
"The most common problem is that the signal handler is declared with the "
238
228
"wrong argument list. It is called as ::"
239
- msgstr ""
240
- "最常見的問題是信號處理程式是用錯誤的引數列表聲明的。它被稱為:\n"
241
- "\n"
242
- "::"
229
+ msgstr "最常見的問題是信號處理程式是用錯誤的引數列表聲明的。它被稱為: ::"
243
230
244
231
#: ../../faq/library.rst:125
245
232
#, fuzzy
246
233
msgid "so it should be declared with two parameters::"
247
- msgstr ""
248
- "所以它應該用兩個參數聲明:\n"
249
- "\n"
250
- "::"
234
+ msgstr "所以它應該用兩個參數聲明: ::"
251
235
252
236
#: ../../faq/library.rst:132
253
237
msgid "Common tasks"
@@ -295,10 +279,7 @@ msgstr ""
295
279
#: ../../faq/library.rst:152
296
280
#, fuzzy
297
281
msgid "The\" global main logic\" of your program may be as simple as ::"
298
- msgstr ""
299
- "你程式的「全局主邏輯」可能像一樣簡單:\n"
300
- "\n"
301
- "::"
282
+ msgstr "你程式的「全局主邏輯」可能像一樣簡單: ::"
302
283
303
284
#: ../../faq/library.rst:157
304
285
#, fuzzy
@@ -328,10 +309,7 @@ msgstr ""
328
309
msgid ""
329
310
"\" Support modules\" that are not intended to be the main module of a program "
330
311
"may include a self-test of the module. ::"
331
- msgstr ""
332
- "不打算成為程式主要模組的\" 支援模組\" 可能包括模組的自檢:\n"
333
- "\n"
334
- "::"
312
+ msgstr "不打算成為程式主要模組的\" 支援模組\" 可能包括模組的自檢: ::"
335
313
336
314
#: ../../faq/library.rst:173
337
315
#, fuzzy
@@ -411,9 +389,7 @@ msgid ""
411
389
"A simple fix is to add a sleep to the end of the program that's long enough "
412
390
"for all the threads to finish::"
413
391
msgstr ""
414
- "一個簡單的修復方法是在程式末尾新增一個足夠長的睡眠,讓所有執行緒都完成:\n"
415
- "\n"
416
- "::"
392
+ "一個簡單的修復方法是在程式末尾新增一個足夠長的睡眠,讓所有執行緒都完成: ::"
417
393
418
394
#: ../../faq/library.rst:265
419
395
#, fuzzy
@@ -429,10 +405,7 @@ msgstr ""
429
405
#: ../../faq/library.rst:269
430
406
#, fuzzy
431
407
msgid "A simple fix is to add a tiny sleep to the start of the run function::"
432
- msgstr ""
433
- "一個簡單的修復方法是在運行函式的開頭新增一個小睡眠:\n"
434
- "\n"
435
- "::"
408
+ msgstr "一個簡單的修復方法是在運行函式的開頭新增一個小睡眠: ::"
436
409
437
410
#: ../../faq/library.rst:282
438
411
#, fuzzy
@@ -479,10 +452,7 @@ msgstr ""
479
452
#: ../../faq/library.rst:302
480
453
#, fuzzy
481
454
msgid "Here's a trivial example::"
482
- msgstr ""
483
- "這是一個簡單的例子:\n"
484
- "\n"
485
- "::"
455
+ msgstr "這是一個簡單的例子: ::"
486
456
487
457
#: ../../faq/library.rst:340
488
458
#, fuzzy
@@ -538,17 +508,12 @@ msgid ""
538
508
"D, D1, D2 are dicts, x, y are objects, i, j are ints)::"
539
509
msgstr ""
540
510
"例如,以下操作都是原子的(L、L1、L2 是列表,D、D1、D2 是字典,x、y 是物件,"
541
- "i、j 是整數):\n"
542
- "\n"
543
- "::"
511
+ "i、j 是整數): ::"
544
512
545
513
#: ../../faq/library.rst:392
546
514
#, fuzzy
547
515
msgid "These aren't::"
548
- msgstr ""
549
- "這些不是:\n"
550
- "\n"
551
- "::"
516
+ msgstr "這些不是: ::"
552
517
553
518
#: ../../faq/library.rst:399
554
519
#, fuzzy
@@ -767,9 +732,7 @@ msgid ""
767
732
"integer in big-endian format from a file::"
768
733
msgstr ""
769
734
"例如,以下程式碼從一個檔案中以大端格式讀取兩個 2 位元組整數和一個 4 位元組整"
770
- "數:\n"
771
- "\n"
772
- "::"
735
+ "數: ::"
773
736
774
737
#: ../../faq/library.rst:512
775
738
#, fuzzy
@@ -831,7 +794,7 @@ msgstr "對於 Win32、OSX、Linux、BSD、Jython、IronPython:"
831
794
832
795
#: ../../faq/library.rst:621
833
796
msgid ":pypi:`pyserial`"
834
- msgstr ""
797
+ msgstr ":pypi:`pyserial` "
835
798
836
799
#: ../../faq/library.rst:623
837
800
msgid "For Unix, see a Usenet post by Mitch Chapman:"
@@ -847,12 +810,11 @@ msgid "Why doesn't closing sys.stdout (stdin, stderr) really close it?"
847
810
msgstr "為什麼關閉 sys.stdout (stdin, stderr) 並沒有真正關閉它?"
848
811
849
812
#: ../../faq/library.rst:631
850
- #, fuzzy
851
813
msgid ""
852
814
"Python :term:`file objects <file object>` are a high-level layer of "
853
815
"abstraction on low-level C file descriptors."
854
816
msgstr ""
855
- "Python :term:`file objects <file object>` 是低階 C 檔案描述器的高階抽象層。"
817
+ "Python :term:`檔案物件 <file object>`\\ 是低階 C 檔案描述器的高階抽象層。"
856
818
857
819
#: ../../faq/library.rst:634
858
820
#, fuzzy
@@ -887,12 +849,9 @@ msgid ""
887
849
"extension modules trying to do I/O). If it is, use :func:`os.close`::"
888
850
msgstr ""
889
851
"要關閉這三個之一的底層 C 檔案描述器,你應該首先確定這是你真正想要做的(例如,"
890
- "你可能會混淆試圖執行 I/O 的擴充模組)。如果是,使用 :func:`os.close`:\n"
891
- "\n"
892
- "::"
852
+ "你可能會混淆試圖執行 I/O 的擴充模組)。如果是,使用 :func:`os.close`: ::"
893
853
894
854
#: ../../faq/library.rst:653
895
- #, fuzzy
896
855
msgid "Or you can use the numeric constants 0, 1 and 2, respectively."
897
856
msgstr "或者你可以分別使用數字常數 0、1 和 2。"
898
857
@@ -912,7 +871,7 @@ msgid ""
912
871
"side and client-side web systems."
913
872
msgstr ""
914
873
"請參閱函式庫參考手冊中標題為 :ref:`internet` 和 :ref:`netdata` 的章節。 "
915
- "Python有許多模組可以幫助你構建服務器端和客戶端 Web 系統。"
874
+ "Python有許多模組可以幫助你構建伺服器端和用戶端 Web 系統。"
916
875
917
876
#: ../../faq/library.rst:668
918
877
#, fuzzy
@@ -948,10 +907,7 @@ msgstr ""
948
907
949
908
#: ../../faq/library.rst:681
950
909
msgid "Yes. Here's a simple example that uses :mod:`urllib.request`::"
951
- msgstr ""
952
- "是的,這是一個 :mod:`urllib.request` 的簡單範例:\n"
953
- "\n"
954
- "::"
910
+ msgstr "是的,這是一個 :mod:`urllib.request` 的簡單範例: ::"
955
911
956
912
#: ../../faq/library.rst:696
957
913
#, fuzzy
@@ -961,9 +917,7 @@ msgid ""
961
917
"``name=Guy Steele, Jr.``::"
962
918
msgstr ""
963
919
"請注意,通常對於百分比編碼的 POST 操作,查詢字串必須使用 :func:`urllib.parse."
964
- "urlencode` 引用。例如,發送 ``name=Guy Steele, Jr.``:\n"
965
- "\n"
966
- "::"
920
+ "urlencode` 引用。例如,發送 ``name=Guy Steele, Jr.``: ::"
967
921
968
922
#: ../../faq/library.rst:704
969
923
msgid ":ref:`urllib-howto` for extensive examples."
@@ -997,9 +951,7 @@ msgid ""
997
951
"work on any host that supports an SMTP listener. ::"
998
952
msgstr ""
999
953
"這是一個使用它的非常簡單的交互式郵件發件人。此方法適用於任何支援 SMTP 偵聽器"
1000
- "的主機。:\n"
1001
- "\n"
1002
- "::"
954
+ "的主機。: ::"
1003
955
1004
956
#: ../../faq/library.rst:741
1005
957
#, fuzzy
@@ -1011,17 +963,14 @@ msgid ""
1011
963
msgstr ""
1012
964
"一個僅適用於 Unix 的替代方案使用 sendmail。 sendmail 程式的位置因係統而異;有"
1013
965
"時是\" /usr/lib/sendmail\" ,有時是\" /usr/sbin/sendmail\" 。 sendmail 手冊頁"
1014
- "將幫助你。這是一些示例程式碼:\n"
1015
- "\n"
1016
- "::"
966
+ "將幫助你。這是一些示例程式碼: ::"
1017
967
1018
968
#: ../../faq/library.rst:761
1019
969
#, fuzzy
1020
970
msgid "How do I avoid blocking in the connect() method of a socket?"
1021
971
msgstr "如何避免阻塞 socket 的 connect() 方法?"
1022
972
1023
973
#: ../../faq/library.rst:763
1024
- #, fuzzy
1025
974
msgid ""
1026
975
"The :mod:`select` module is commonly used to help with asynchronous I/O on "
1027
976
"sockets."
@@ -1053,9 +1002,9 @@ msgid ""
1053
1002
"`select.select` to check if it's writable."
1054
1003
msgstr ""
1055
1004
"你可以使用 :meth:`socket.connect_ex` 方法來避免建立例外。它只會回傳 errno "
1056
- "值。要輪詢,你可以稍後再次呼叫: meth: `socket.connect_ex` - ``0`` 或 ``errno."
1057
- "EISCONN`` 表示你已連接 - 或者你可以將此 socket 傳遞給: meth:` select."
1058
- "select` 檢查它是否可寫。"
1005
+ "值。要輪詢,你可以稍後再次呼叫 : meth: `socket.connect_ex` - ``0`` 或 ``errno."
1006
+ "EISCONN`` 表示你已連接 - 或者你可以將此 socket 傳遞給 : meth:` select.select` "
1007
+ "檢查它是否可寫。"
1059
1008
1060
1009
#: ../../faq/library.rst:782
1061
1010
msgid ""
@@ -1131,10 +1080,7 @@ msgstr "如何在 Python 中生成隨機數?"
1131
1080
msgid ""
1132
1081
"The standard module :mod:`random` implements a random number generator. "
1133
1082
"Usage is simple::"
1134
- msgstr ""
1135
- "標準模組 :mod:`random` 實作了一個隨機數生成器。用法很簡單:\n"
1136
- "\n"
1137
- "::"
1083
+ msgstr "標準模組 :mod:`random` 實作了一個隨機數生成器。用法很簡單: ::"
1138
1084
1139
1085
#: ../../faq/library.rst:828
1140
1086
msgid "This returns a random floating point number in the range [0, 1)."
@@ -1176,6 +1122,3 @@ msgid ""
1176
1122
"multiple random number generators."
1177
1123
msgstr ""
1178
1124
"還有一個 ``Random`` 類別,你可以將它實例化以建立多個獨立的隨機數生成器。"
1179
-
1180
- #~ msgid "https://pypi.org/project/pyserial/"
1181
- #~ msgstr "https://pypi.org/project/pyserial/"