@@ -34,7 +34,6 @@ msgid "General Library Questions"
3434msgstr "常見函式問題"
3535
3636#: ../../faq/library.rst:15
37- #, fuzzy
3837msgid "How do I find a module or application to perform task X?"
3938msgstr "我如何找到執行任務 X 的模組或應用程式?"
4039
@@ -94,10 +93,7 @@ msgstr "用 C 編寫並動態載入的模組(.dll、.pyd、.so、.sl 等);
9493msgid ""
9594"modules written in C and linked with the interpreter; to get a list of "
9695"these, type::"
97- msgstr ""
98- "用 C 編寫並與直譯器鏈接的模組;要獲得這些 list,請輸入:\n"
99- "\n"
100- "::"
96+ msgstr "用 C 編寫並與直譯器鏈接的模組;要獲得這些 list,請輸入: ::"
10197
10298#: ../../faq/library.rst:47
10399msgid "How do I make a Python script executable on Unix?"
@@ -127,10 +123,7 @@ msgstr ""
127123msgid ""
128124"The second can be done in a number of ways. The most straightforward way is "
129125"to write ::"
130- msgstr ""
131- "第二個可以通過多種方式完成。最直接的方法是寫:\n"
132- "\n"
133- "::"
126+ msgstr "第二個可以通過多種方式完成。最直接的方法是寫: ::"
134127
135128#: ../../faq/library.rst:61
136129#, fuzzy
@@ -149,9 +142,7 @@ msgid ""
149142msgstr ""
150143"如果你希望腳本獨立於 Python 直譯器所在的位置,你可以使用 :program:`env` 程"
151144"式。幾乎所有 Unix 變體都支援以下內容,假設 Python 直譯器位於使用者的 :envvar:"
152- "`PATH` 上的目錄中:\n"
153- "\n"
154- "::"
145+ "`PATH` 上的目錄中: ::"
155146
156147#: ../../faq/library.rst:71
157148#, fuzzy
@@ -179,9 +170,8 @@ msgid ""
179170"The minor disadvantage is that this defines the script's __doc__ string. "
180171"However, you can fix that by adding ::"
181172msgstr ""
182- "次要缺點是這定義了腳本的 __doc__ 字串。但是,你可以通過新增來解決這個問題:\n"
183- "\n"
184- "::"
173+ "次要缺點是這定義了腳本的 __doc__ 字串。但是,你可以通過新增來解決這個問"
174+ "題: ::"
185175
186176#: ../../faq/library.rst:94
187177msgid "Is there a curses/termcap package for Python?"
@@ -236,18 +226,12 @@ msgstr "為什麼我的信號處理程式不起作用?"
236226msgid ""
237227"The most common problem is that the signal handler is declared with the "
238228"wrong argument list. It is called as ::"
239- msgstr ""
240- "最常見的問題是信號處理程式是用錯誤的引數列表聲明的。它被稱為:\n"
241- "\n"
242- "::"
229+ msgstr "最常見的問題是信號處理程式是用錯誤的引數列表聲明的。它被稱為: ::"
243230
244231#: ../../faq/library.rst:125
245232#, fuzzy
246233msgid "so it should be declared with two parameters::"
247- msgstr ""
248- "所以它應該用兩個參數聲明:\n"
249- "\n"
250- "::"
234+ msgstr "所以它應該用兩個參數聲明: ::"
251235
252236#: ../../faq/library.rst:132
253237msgid "Common tasks"
@@ -295,10 +279,7 @@ msgstr ""
295279#: ../../faq/library.rst:152
296280#, fuzzy
297281msgid "The\" global main logic\" of your program may be as simple as ::"
298- msgstr ""
299- "你程式的「全局主邏輯」可能像一樣簡單:\n"
300- "\n"
301- "::"
282+ msgstr "你程式的「全局主邏輯」可能像一樣簡單: ::"
302283
303284#: ../../faq/library.rst:157
304285#, fuzzy
@@ -328,10 +309,7 @@ msgstr ""
328309msgid ""
329310"\" Support modules\" that are not intended to be the main module of a program "
330311"may include a self-test of the module. ::"
331- msgstr ""
332- "不打算成為程式主要模組的\" 支援模組\" 可能包括模組的自檢:\n"
333- "\n"
334- "::"
312+ msgstr "不打算成為程式主要模組的\" 支援模組\" 可能包括模組的自檢: ::"
335313
336314#: ../../faq/library.rst:173
337315#, fuzzy
@@ -411,9 +389,7 @@ msgid ""
411389"A simple fix is to add a sleep to the end of the program that's long enough "
412390"for all the threads to finish::"
413391msgstr ""
414- "一個簡單的修復方法是在程式末尾新增一個足夠長的睡眠,讓所有執行緒都完成:\n"
415- "\n"
416- "::"
392+ "一個簡單的修復方法是在程式末尾新增一個足夠長的睡眠,讓所有執行緒都完成: ::"
417393
418394#: ../../faq/library.rst:265
419395#, fuzzy
@@ -429,10 +405,7 @@ msgstr ""
429405#: ../../faq/library.rst:269
430406#, fuzzy
431407msgid "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 "一個簡單的修復方法是在運行函式的開頭新增一個小睡眠: ::"
436409
437410#: ../../faq/library.rst:282
438411#, fuzzy
@@ -479,10 +452,7 @@ msgstr ""
479452#: ../../faq/library.rst:302
480453#, fuzzy
481454msgid "Here's a trivial example::"
482- msgstr ""
483- "這是一個簡單的例子:\n"
484- "\n"
485- "::"
455+ msgstr "這是一個簡單的例子: ::"
486456
487457#: ../../faq/library.rst:340
488458#, fuzzy
@@ -538,17 +508,12 @@ msgid ""
538508"D, D1, D2 are dicts, x, y are objects, i, j are ints)::"
539509msgstr ""
540510"例如,以下操作都是原子的(L、L1、L2 是列表,D、D1、D2 是字典,x、y 是物件,"
541- "i、j 是整數):\n"
542- "\n"
543- "::"
511+ "i、j 是整數): ::"
544512
545513#: ../../faq/library.rst:392
546514#, fuzzy
547515msgid "These aren't::"
548- msgstr ""
549- "這些不是:\n"
550- "\n"
551- "::"
516+ msgstr "這些不是: ::"
552517
553518#: ../../faq/library.rst:399
554519#, fuzzy
@@ -767,9 +732,7 @@ msgid ""
767732"integer in big-endian format from a file::"
768733msgstr ""
769734"例如,以下程式碼從一個檔案中以大端格式讀取兩個 2 位元組整數和一個 4 位元組整"
770- "數:\n"
771- "\n"
772- "::"
735+ "數: ::"
773736
774737#: ../../faq/library.rst:512
775738#, fuzzy
@@ -831,7 +794,7 @@ msgstr "對於 Win32、OSX、Linux、BSD、Jython、IronPython:"
831794
832795#: ../../faq/library.rst:621
833796msgid ":pypi:`pyserial`"
834- msgstr ""
797+ msgstr ":pypi:`pyserial` "
835798
836799#: ../../faq/library.rst:623
837800msgid "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?"
847810msgstr "為什麼關閉 sys.stdout (stdin, stderr) 並沒有真正關閉它?"
848811
849812#: ../../faq/library.rst:631
850- #, fuzzy
851813msgid ""
852814"Python :term:`file objects <file object>` are a high-level layer of "
853815"abstraction on low-level C file descriptors."
854816msgstr ""
855- "Python :term:`file objects <file object>` 是低階 C 檔案描述器的高階抽象層。"
817+ "Python :term:`檔案物件 <file object>`\\ 是低階 C 檔案描述器的高階抽象層。"
856818
857819#: ../../faq/library.rst:634
858820#, fuzzy
@@ -887,12 +849,9 @@ msgid ""
887849"extension modules trying to do I/O). If it is, use :func:`os.close`::"
888850msgstr ""
889851"要關閉這三個之一的底層 C 檔案描述器,你應該首先確定這是你真正想要做的(例如,"
890- "你可能會混淆試圖執行 I/O 的擴充模組)。如果是,使用 :func:`os.close`:\n"
891- "\n"
892- "::"
852+ "你可能會混淆試圖執行 I/O 的擴充模組)。如果是,使用 :func:`os.close`: ::"
893853
894854#: ../../faq/library.rst:653
895- #, fuzzy
896855msgid "Or you can use the numeric constants 0, 1 and 2, respectively."
897856msgstr "或者你可以分別使用數字常數 0、1 和 2。"
898857
@@ -912,7 +871,7 @@ msgid ""
912871"side and client-side web systems."
913872msgstr ""
914873"請參閱函式庫參考手冊中標題為 :ref:`internet` 和 :ref:`netdata` 的章節。 "
915- "Python有許多模組可以幫助你構建服務器端和客戶端 Web 系統。"
874+ "Python有許多模組可以幫助你構建伺服器端和用戶端 Web 系統。"
916875
917876#: ../../faq/library.rst:668
918877#, fuzzy
@@ -948,10 +907,7 @@ msgstr ""
948907
949908#: ../../faq/library.rst:681
950909msgid "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` 的簡單範例: ::"
955911
956912#: ../../faq/library.rst:696
957913#, fuzzy
@@ -961,9 +917,7 @@ msgid ""
961917"``name=Guy Steele, Jr.``::"
962918msgstr ""
963919"請注意,通常對於百分比編碼的 POST 操作,查詢字串必須使用 :func:`urllib.parse."
964- "urlencode` 引用。例如,發送 ``name=Guy Steele, Jr.``:\n"
965- "\n"
966- "::"
920+ "urlencode` 引用。例如,發送 ``name=Guy Steele, Jr.``: ::"
967921
968922#: ../../faq/library.rst:704
969923msgid ":ref:`urllib-howto` for extensive examples."
@@ -997,9 +951,7 @@ msgid ""
997951"work on any host that supports an SMTP listener. ::"
998952msgstr ""
999953"這是一個使用它的非常簡單的交互式郵件發件人。此方法適用於任何支援 SMTP 偵聽器"
1000- "的主機。:\n"
1001- "\n"
1002- "::"
954+ "的主機。: ::"
1003955
1004956#: ../../faq/library.rst:741
1005957#, fuzzy
@@ -1011,17 +963,14 @@ msgid ""
1011963msgstr ""
1012964"一個僅適用於 Unix 的替代方案使用 sendmail。 sendmail 程式的位置因係統而異;有"
1013965"時是\" /usr/lib/sendmail\" ,有時是\" /usr/sbin/sendmail\" 。 sendmail 手冊頁"
1014- "將幫助你。這是一些示例程式碼:\n"
1015- "\n"
1016- "::"
966+ "將幫助你。這是一些示例程式碼: ::"
1017967
1018968#: ../../faq/library.rst:761
1019969#, fuzzy
1020970msgid "How do I avoid blocking in the connect() method of a socket?"
1021971msgstr "如何避免阻塞 socket 的 connect() 方法?"
1022972
1023973#: ../../faq/library.rst:763
1024- #, fuzzy
1025974msgid ""
1026975"The :mod:`select` module is commonly used to help with asynchronous I/O on "
1027976"sockets."
@@ -1053,9 +1002,9 @@ msgid ""
10531002"`select.select` to check if it's writable."
10541003msgstr ""
10551004"你可以使用 :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+ "檢查它是否可寫。"
10591008
10601009#: ../../faq/library.rst:782
10611010msgid ""
@@ -1131,10 +1080,7 @@ msgstr "如何在 Python 中生成隨機數?"
11311080msgid ""
11321081"The standard module :mod:`random` implements a random number generator. "
11331082"Usage is simple::"
1134- msgstr ""
1135- "標準模組 :mod:`random` 實作了一個隨機數生成器。用法很簡單:\n"
1136- "\n"
1137- "::"
1083+ msgstr "標準模組 :mod:`random` 實作了一個隨機數生成器。用法很簡單: ::"
11381084
11391085#: ../../faq/library.rst:828
11401086msgid "This returns a random floating point number in the range [0, 1)."
@@ -1176,6 +1122,3 @@ msgid ""
11761122"multiple random number generators."
11771123msgstr ""
11781124"還有一個 ``Random`` 類別,你可以將它實例化以建立多個獨立的隨機數生成器。"
1179-
1180- #~ msgid "https://pypi.org/project/pyserial/"
1181- #~ msgstr "https://pypi.org/project/pyserial/"