-
-
Notifications
You must be signed in to change notification settings - Fork 214
/
Copy pathwindows.po
566 lines (506 loc) · 26.8 KB
/
windows.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
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2022, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
# Cecil Sheng <[email protected]>, 2015
# Liang-Bo Wang <[email protected]>, 2015
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-01 22:24+0800\n"
"PO-Revision-Date: 2022-11-09 17:25+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.2\n"
#: ../../faq/windows.rst:9
msgid "Python on Windows FAQ"
msgstr "在 Windows 使用 Python 的常見問答集"
#: ../../faq/windows.rst:12
msgid "Contents"
msgstr "目錄"
#: ../../faq/windows.rst:22
msgid "How do I run a Python program under Windows?"
msgstr "如何在 Windows 作業系統裡運行 Python 程式?"
#: ../../faq/windows.rst:24
msgid ""
"This is not necessarily a straightforward question. If you are already "
"familiar with running programs from the Windows command line then everything "
"will seem obvious; otherwise, you might need a little more guidance."
msgstr ""
"這個問題的答案可能有點複雜。如果你經常使用「命令提示字元」執行程式,那這對你"
"來說不會是什麼難事。如果不然,那就需要更仔細的說明了。"
#: ../../faq/windows.rst:28
msgid ""
"Unless you use some sort of integrated development environment, you will end "
"up *typing* Windows commands into what is referred to as a \"Command prompt "
"window\". Usually you can create such a window from your search bar by "
"searching for ``cmd``. You should be able to recognize when you have "
"started such a window because you will see a Windows \"command prompt\", "
"which usually looks like this:"
msgstr ""
"除非你使用某種整合開發環境,否則你最終將會在所謂的「命令提示字元視窗」中 *打"
"字輸入* Windows 命令。通常,你可以透過從搜尋欄中搜尋 ``cmd`` 來建立這樣的視"
"窗。你應該能夠認出何時已啟動這樣的視窗,因為你將看到 Windows「命令提示字"
"元」,它通常看起來像這樣:"
#: ../../faq/windows.rst:35
msgid "C:\\>"
msgstr "C:\\>"
#: ../../faq/windows.rst:39
msgid ""
"The letter may be different, and there might be other things after it, so "
"you might just as easily see something like:"
msgstr ""
"第一個字母可能不一樣,且後面也可能還有其他內容,因此你可能會很容易看到類似以"
"下的文字:"
#: ../../faq/windows.rst:42
msgid "D:\\YourName\\Projects\\Python>"
msgstr "D:\\YourName\\Projects\\Python>"
#: ../../faq/windows.rst:46
msgid ""
"depending on how your computer has been set up and what else you have "
"recently done with it. Once you have started such a window, you are well on "
"the way to running Python programs."
msgstr ""
"取決於你的電腦如何被設置,以及你最近對它所做的其他操作。一旦你啟動了這樣一個"
"視窗,你就即將可以運行 Python 程式了。"
#: ../../faq/windows.rst:50
msgid ""
"You need to realize that your Python scripts have to be processed by another "
"program called the Python *interpreter*. The interpreter reads your script, "
"compiles it into bytecodes, and then executes the bytecodes to run your "
"program. So, how do you arrange for the interpreter to handle your Python?"
msgstr ""
"你需要了解,你的 Python 腳本必須被另一個稱為 Python *直譯器*\\ 的程序來處理。"
"直譯器會讀取你的腳本,將其編譯為位元組碼,然後執行該位元組碼以運行你的程式。"
"那麼,你要如何安排直譯器來處理你的 Python 呢?"
#: ../../faq/windows.rst:55
msgid ""
"First, you need to make sure that your command window recognises the word "
"\"py\" as an instruction to start the interpreter. If you have opened a "
"command window, you should try entering the command ``py`` and hitting "
"return:"
msgstr ""
"首先,你需要確保你的命令視窗會將單字 \"py\" 識別為啟動直譯器的指令。如果你已"
"經開啟一個命令視窗,則你應該試試輸入命令 ``py`` 並按下 return 鍵:"
#: ../../faq/windows.rst:60
msgid "C:\\Users\\YourName> py"
msgstr "C:\\Users\\YourName> py"
#: ../../faq/windows.rst:64
msgid "You should then see something like:"
msgstr "然後,你應該看到類似下面的內容:"
#: ../../faq/windows.rst:66
msgid ""
"Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit "
"(Intel)] on win32\n"
"Type \"help\", \"copyright\", \"credits\" or \"license\" for more "
"information.\n"
">>>"
msgstr ""
"Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit "
"(Intel)] on win32\n"
"Type \"help\", \"copyright\", \"credits\" or \"license\" for more "
"information.\n"
">>>"
#: ../../faq/windows.rst:72
msgid ""
"You have started the interpreter in \"interactive mode\". That means you can "
"enter Python statements or expressions interactively and have them executed "
"or evaluated while you wait. This is one of Python's strongest features. "
"Check it by entering a few expressions of your choice and seeing the results:"
msgstr ""
"你已經啟動直譯器中的「互動模式」。這表示你能夠以互動方式輸入 Python 陳述式或"
"運算式,並在等待時執行或計算它們。這是 Python 最強大的功能之一。輸入你所選的"
"幾個運算式並查看結果,可以檢驗此功能:"
#: ../../faq/windows.rst:77
msgid ""
">>> print(\"Hello\")\n"
"Hello\n"
">>> \"Hello\" * 3\n"
"'HelloHelloHello'"
msgstr ""
">>> print(\"Hello\")\n"
"Hello\n"
">>> \"Hello\" * 3\n"
"'HelloHelloHello'"
#: ../../faq/windows.rst:84
msgid ""
"Many people use the interactive mode as a convenient yet highly programmable "
"calculator. When you want to end your interactive Python session, call the :"
"func:`exit` function or hold the :kbd:`Ctrl` key down while you enter a :kbd:"
"`Z`, then hit the \":kbd:`Enter`\" key to get back to your Windows command "
"prompt."
msgstr ""
"許多人將互動模式作為方便但可高度程式化的計算機。如果你要結束互動式 Python 對"
"話,請呼叫 :func:`exit` 函式或是按住 :kbd:`Ctrl` 鍵再輸入 :kbd:`Z`,然後按下 "
"\":kbd:`Enter`\" 鍵以返回 Windows 命令提示字元。"
#: ../../faq/windows.rst:90
msgid ""
"You may also find that you have a Start-menu entry such as :menuselection:"
"`Start --> Programs --> Python 3.x --> Python (command line)` that results "
"in you seeing the ``>>>`` prompt in a new window. If so, the window will "
"disappear after you call the :func:`exit` function or enter the :kbd:`Ctrl-"
"Z` character; Windows is running a single \"python\" command in the window, "
"and closes it when you terminate the interpreter."
msgstr ""
"你可能還會發現你有一個開始功能表項目,像是::menuselection:`開始 --> 所有程"
"式 --> Python 3.x --> Python(命令行)`,它會讓你在一個新視窗中看到 ``>>>`` "
"提示字元。如果是這樣,該視窗將在你呼叫 :func:`exit` 函式或輸入 :kbd:`Ctrl-Z` "
"字元後消失;Windows 正在該視窗中運行單一個「python」命令,並在你終止直譯器時"
"將其關閉。"
#: ../../faq/windows.rst:97
msgid ""
"Now that we know the ``py`` command is recognized, you can give your Python "
"script to it. You'll have to give either an absolute or a relative path to "
"the Python script. Let's say your Python script is located in your desktop "
"and is named ``hello.py``, and your command prompt is nicely opened in your "
"home directory so you're seeing something similar to::"
msgstr ""
"現在我們知道 ``py`` 命令已被識別,而你可以將你的 Python 腳本提供給它。你必須"
"為 Python 腳本給定絕對路徑或相對路徑。假設你的 Python 腳本位於桌面上,並被命"
"名為 ``hello.py``,且你的命令提示字元在你的家目錄 (home directory) 中順利地被"
"開啟,那麼你就會看到類似以下的內容: ::"
#: ../../faq/windows.rst:104
msgid "C:\\Users\\YourName>"
msgstr "C:\\Users\\YourName>"
#: ../../faq/windows.rst:106
msgid ""
"So now you'll ask the ``py`` command to give your script to Python by typing "
"``py`` followed by your script path::"
msgstr ""
"因此,現在你將透過鍵入 ``py`` 加上腳本路徑,來使用 ``py`` 命令將你的腳本提供"
"給 Python: ::"
#: ../../faq/windows.rst:110
msgid ""
"C:\\Users\\YourName> py Desktop\\hello.py\n"
"hello"
msgstr ""
"C:\\Users\\YourName> py Desktop\\hello.py\n"
"hello"
#: ../../faq/windows.rst:114
msgid "How do I make Python scripts executable?"
msgstr "如何使 Python 腳本可以執行?"
#: ../../faq/windows.rst:116
msgid ""
"On Windows, the standard Python installer already associates the .py "
"extension with a file type (Python.File) and gives that file type an open "
"command that runs the interpreter (``D:\\Program Files\\Python\\python.exe "
"\"%1\" %*``). This is enough to make scripts executable from the command "
"prompt as 'foo.py'. If you'd rather be able to execute the script by simple "
"typing 'foo' with no extension you need to add .py to the PATHEXT "
"environment variable."
msgstr ""
"在 Windows 上,標準的 Python 安裝程式已將 .py 副檔名與一種檔案類型 (Python."
"File) 進行關聯,並為該檔案類型提供一個開啟命令來運行直譯器 (``D:\\Program "
"Files\\Python\\python.exe \"%1\" %*``)。這足以使腳本能以類似 'foo.py' 的形式"
"從命令提示字元被執行。如果你希望能夠簡單地輸入 'foo' 來執行腳本,而不用加上副"
"檔名,則需要將 .py 新增至 PATHEXT 環境變數中。"
#: ../../faq/windows.rst:124
msgid "Why does Python sometimes take so long to start?"
msgstr "為什麼 Python 有時需要這麼長的時間才能開始?"
#: ../../faq/windows.rst:126
msgid ""
"Usually Python starts very quickly on Windows, but occasionally there are "
"bug reports that Python suddenly begins to take a long time to start up. "
"This is made even more puzzling because Python will work fine on other "
"Windows systems which appear to be configured identically."
msgstr ""
"通常 Python 在 Windows 上啟動得非常快,但偶爾會有一些錯誤報告,內容是 Python "
"突然開始需要很長的時間才能啟動。這種情形更令人費解,因為 Python 在其他 "
"Windows 系統上可以正常工作,而那些系統似乎也有相同的配置。"
#: ../../faq/windows.rst:131
msgid ""
"The problem may be caused by a misconfiguration of virus checking software "
"on the problem machine. Some virus scanners have been known to introduce "
"startup overhead of two orders of magnitude when the scanner is configured "
"to monitor all reads from the filesystem. Try checking the configuration of "
"virus scanning software on your systems to ensure that they are indeed "
"configured identically. McAfee, when configured to scan all file system read "
"activity, is a particular offender."
msgstr ""
"這個問題可能是由發生此問題的電腦上的病毒檢查軟體配置錯誤所引起的。目前已知某"
"些病毒掃描程式,在它們被配置為監視來自檔案系統的所有讀取時,會引入兩個數量級"
"的啟動負擔。請試著檢查你系統上的病毒掃描軟體配置,以確保它們的配置確實相同。"
"當 McAfee 被配置為掃描所有檔案系統的讀取活動時,它是一個特定的違規者。"
#: ../../faq/windows.rst:141
msgid "How do I make an executable from a Python script?"
msgstr "如何從 Python 腳本製作可執行檔?"
#: ../../faq/windows.rst:143
msgid ""
"See :ref:`faq-create-standalone-binary` for a list of tools that can be used "
"to make executables."
msgstr ""
"請參閱\\ :ref:`faq-create-standalone-binary`\\ 該章節列出了用於製作可執行檔的"
"工具清單。"
#: ../../faq/windows.rst:148
msgid "Is a ``*.pyd`` file the same as a DLL?"
msgstr "``*.pyd`` 檔是否與 DLL 相同?"
#: ../../faq/windows.rst:150
msgid ""
"Yes, .pyd files are dll's, but there are a few differences. If you have a "
"DLL named ``foo.pyd``, then it must have a function ``PyInit_foo()``. You "
"can then write Python \"import foo\", and Python will search for foo.pyd (as "
"well as foo.py, foo.pyc) and if it finds it, will attempt to call "
"``PyInit_foo()`` to initialize it. You do not link your .exe with foo.lib, "
"as that would cause Windows to require the DLL to be present."
msgstr ""
"是的,.pyd 檔類似於 dll,但也有一些區別。如果你有一個名為 ``foo.pyd`` 的 "
"DLL,則它必須具有函式 ``PyInit_foo()``。接著你可以將 \"import foo\" 寫入 "
"Python 腳本,Python 將會搜尋 foo.pyd(以及 foo.py、foo.pyc),如果 Python 找"
"到它,將會嘗試呼叫 ``PyInit_foo()`` 來將它初始化。你並不會將你的 .exe 與 foo."
"lib 連結 (link),因為這會導致 Windows 要求 DLL 的存在。"
#: ../../faq/windows.rst:157
msgid ""
"Note that the search path for foo.pyd is PYTHONPATH, not the same as the "
"path that Windows uses to search for foo.dll. Also, foo.pyd need not be "
"present to run your program, whereas if you linked your program with a dll, "
"the dll is required. Of course, foo.pyd is required if you want to say "
"``import foo``. In a DLL, linkage is declared in the source code with "
"``__declspec(dllexport)``. In a .pyd, linkage is defined in a list of "
"available functions."
msgstr ""
"請注意,foo.pyd 的搜尋路徑是 PYTHONPATH,與 Windows 用於搜尋 foo.dll 的路徑不"
"同。此外,foo.pyd 不需存在即可運行你的程式,然而如果你將程式連結了一個 dll,"
"則該 dll 會是必要的。當然,如果你想要 ``import foo``,foo.pyd 就是必要的。在 "
"DLL 中,連結是以 ``__declspec(dllexport)`` 在原始碼中被宣告。在 .pyd 中,連結"
"是在一個可用函式的 list(串列)中被定義。"
#: ../../faq/windows.rst:166
msgid "How can I embed Python into a Windows application?"
msgstr "如何將 Python 嵌入 Windows 應用程式中?"
#: ../../faq/windows.rst:168
msgid ""
"Embedding the Python interpreter in a Windows app can be summarized as "
"follows:"
msgstr "在 Windows 應用程式中嵌入 Python 直譯器的過程可以總結如下:"
#: ../../faq/windows.rst:170
msgid ""
"Do **not** build Python into your .exe file directly. On Windows, Python "
"must be a DLL to handle importing modules that are themselves DLL's. (This "
"is the first key undocumented fact.) Instead, link to :file:`python{NN}."
"dll`; it is typically installed in ``C:\\Windows\\System``. *NN* is the "
"Python version, a number such as \"33\" for Python 3.3."
msgstr ""
"**不要**\\ 直接將 Python 建置到你的 .exe 檔中。在 Windows 上,Python 必須是一"
"個 DLL 來處理模組的 import,而那些模組本身也是 DLL。(這是第一個未正式記載的"
"關鍵事實。)請改為連結到 :file:`python{NN}.dll`;它通常被安裝在 ``C:"
"\\Windows\\System`` 中。*NN* 是 Python 版本,例如 \"33\" 就是指 Python 3.3。"
#: ../../faq/windows.rst:176
msgid ""
"You can link to Python in two different ways. Load-time linking means "
"linking against :file:`python{NN}.lib`, while run-time linking means linking "
"against :file:`python{NN}.dll`. (General note: :file:`python{NN}.lib` is "
"the so-called \"import lib\" corresponding to :file:`python{NN}.dll`. It "
"merely defines symbols for the linker.)"
msgstr ""
"你可以透過兩種不同的方式連結到 Python。載入時連結 (load-time linking) 表示要"
"連結到 :file:`python{NN}.lib`,而執行環境連結 (run-time linking) 表示要連結"
"到 :file:`python{NN}.dll`。(一般註解::file:`python{NN}.lib` 是 :file:"
"`python{NN}.dll` 相對應的所謂 \"import lib\"。它只會為鏈接器定義符號。)"
#: ../../faq/windows.rst:182
msgid ""
"Run-time linking greatly simplifies link options; everything happens at run "
"time. Your code must load :file:`python{NN}.dll` using the Windows "
"``LoadLibraryEx()`` routine. The code must also use access routines and "
"data in :file:`python{NN}.dll` (that is, Python's C API's) using pointers "
"obtained by the Windows ``GetProcAddress()`` routine. Macros can make using "
"these pointers transparent to any C code that calls routines in Python's C "
"API."
msgstr ""
"執行環境連結大大簡化了連結選項;所有事情都會發生在執行環境。你的程式碼必須使"
"用 Windows ``LoadLibraryEx()`` 常式 (routine) 來載入 :file:`python{NN}.dll`。"
"該程式碼也必須用 Windows ``GetProcAddress()`` 常式所取得的指標,來使用 :file:"
"`python{NN}.dll` 中的(即為 Python C API 的)存取常式和資料。對於任何呼叫 "
"Python C API 常式的 C 程式碼,巨集可以讓使用這些指標的過程透明化。"
#: ../../faq/windows.rst:191
msgid ""
"If you use SWIG, it is easy to create a Python \"extension module\" that "
"will make the app's data and methods available to Python. SWIG will handle "
"just about all the grungy details for you. The result is C code that you "
"link *into* your .exe file (!) You do **not** have to create a DLL file, "
"and this also simplifies linking."
msgstr ""
"如果你使用 SWIG,則可輕鬆地建立一個 Python 「擴充模組」,該模組將使應用程式的"
"資料和 method(方法)可供 Python 使用。SWIG 會為你處理幾乎所有的繁瑣細節。結"
"果就是,你會將 C 程式碼連結\\ *到*\\ 你的 .exe 檔裡(!)你\\ **不必**\\ 建"
"立 DLL 檔,而這也簡化了連結。"
#: ../../faq/windows.rst:197
msgid ""
"SWIG will create an init function (a C function) whose name depends on the "
"name of the extension module. For example, if the name of the module is "
"leo, the init function will be called initleo(). If you use SWIG shadow "
"classes, as you should, the init function will be called initleoc(). This "
"initializes a mostly hidden helper class used by the shadow class."
msgstr ""
"SWIG 將建立一個 init 函式(一個 C 函式),其名稱取決於擴充模組的名稱。例如,"
"如果模組的名稱是 leo,則該 init 函式會命名為 initleo()。如果你使用 SWIG "
"shadow class(類別),則 init 函式會命名為 initleoc()。這會初始化被 shadow "
"class 所用的大多數隱藏的 helper class。"
#: ../../faq/windows.rst:203
msgid ""
"The reason you can link the C code in step 2 into your .exe file is that "
"calling the initialization function is equivalent to importing the module "
"into Python! (This is the second key undocumented fact.)"
msgstr ""
"你可以將步驟 2 中的 C 程式碼連結到 .exe 檔中的原因是,呼叫初始化函式就等效於 "
"import 模組進 Python!(這是第二個未正式記載的關鍵事實。)"
#: ../../faq/windows.rst:207
msgid ""
"In short, you can use the following code to initialize the Python "
"interpreter with your extension module."
msgstr "簡而言之,你可以使用以下程式碼,以你的擴充模組初始化 Python 直譯器。"
#: ../../faq/windows.rst:210
msgid ""
"#include <Python.h>\n"
"...\n"
"Py_Initialize(); // Initialize Python.\n"
"initmyAppc(); // Initialize (import) the helper class.\n"
"PyRun_SimpleString(\"import myApp\"); // Import the shadow class."
msgstr ""
#: ../../faq/windows.rst:218
msgid ""
"There are two problems with Python's C API which will become apparent if you "
"use a compiler other than MSVC, the compiler used to build pythonNN.dll."
msgstr ""
"Python 的 C API 有兩個問題,如果你使用 MSVC(用於建置 pythonNN.dll 的編譯器)"
"以外的編譯器,這些問題將會變得明顯。"
#: ../../faq/windows.rst:221
msgid ""
"Problem 1: The so-called \"Very High Level\" functions that take ``FILE *`` "
"arguments will not work in a multi-compiler environment because each "
"compiler's notion of a ``struct FILE`` will be different. From an "
"implementation standpoint these are very low level functions."
msgstr ""
"問題 1:使用 ``FILE *`` 引數的所謂「非常高階」的函式,在多編譯器 (multi-"
"compiler) 的環境中會無法作用,因為每個編譯器對 ``struct FILE`` 的概念不同。從"
"實作的觀點來看,這些都是非常\\ _低階_\\ 的函式。"
#: ../../faq/windows.rst:226
msgid ""
"Problem 2: SWIG generates the following code when generating wrappers to "
"void functions:"
msgstr "問題 2:SWIG 在為 void 函式產生包裝函式 (wrapper) 時會產生以下程式碼:"
#: ../../faq/windows.rst:229
msgid ""
"Py_INCREF(Py_None);\n"
"_resultobj = Py_None;\n"
"return _resultobj;"
msgstr ""
"Py_INCREF(Py_None);\n"
"_resultobj = Py_None;\n"
"return _resultobj;"
#: ../../faq/windows.rst:235
msgid ""
"Alas, Py_None is a macro that expands to a reference to a complex data "
"structure called _Py_NoneStruct inside pythonNN.dll. Again, this code will "
"fail in a mult-compiler environment. Replace such code by:"
msgstr ""
"唉,Py_None 是一個巨集,它會延伸到一個參照,指向 pythonNN.dll 內部的一種稱為 "
"_Py_NoneStruct 的複雜資料結構。同樣的,此程式碼在多編譯器環境中將會失效。請將"
"此類程式碼替換為:"
#: ../../faq/windows.rst:239
msgid "return Py_BuildValue(\"\");"
msgstr "return Py_BuildValue(\"\");"
#: ../../faq/windows.rst:243
msgid ""
"It may be possible to use SWIG's ``%typemap`` command to make the change "
"automatically, though I have not been able to get this to work (I'm a "
"complete SWIG newbie)."
msgstr ""
"有可能可以使用 SWIG 的 ``%typemap`` 命令以自動進行程式碼變更,雖然我未曾這樣"
"正常運作過(我是一個完全的 SWIG 新手)。"
#: ../../faq/windows.rst:247
msgid ""
"Using a Python shell script to put up a Python interpreter window from "
"inside your Windows app is not a good idea; the resulting window will be "
"independent of your app's windowing system. Rather, you (or the "
"wxPythonWindow class) should create a \"native\" interpreter window. It is "
"easy to connect that window to the Python interpreter. You can redirect "
"Python's i/o to _any_ object that supports read and write, so all you need "
"is a Python object (defined in your extension module) that contains read() "
"and write() methods."
msgstr ""
"使用 Python shell 腳本從你的 Windows 應用程式內部建造一個 Python 直譯器視窗不"
"是一個好主意;該視窗將會獨立於你的應用程式視窗系統。與其如此,你(或 "
"wxPythonWindow class)應該要建立一個「本機」直譯器視窗。將該視窗連接到 "
"Python 直譯器是很容易的。你可以將 Python 的 i/o 重定向 (redirect) 到可支援讀"
"取和寫入的任何物件,因此你只需要一個包含 read() 和 write() method 的 Python "
"物件(在你的擴充模組中被定義)就可以了。"
#: ../../faq/windows.rst:256
msgid "How do I keep editors from inserting tabs into my Python source?"
msgstr "如何防止編輯器在我的 Python 原始碼中插入 tab?"
#: ../../faq/windows.rst:258
msgid ""
"The FAQ does not recommend using tabs, and the Python style guide, :pep:`8`, "
"recommends 4 spaces for distributed Python code; this is also the Emacs "
"python-mode default."
msgstr ""
"FAQ 不建議使用 tab,且 Python 風格指南 :pep:`8` 建議在分散式 Python 程式碼使"
"用 4 個空格;這也是 Emacs 的 python 模式預設值。"
#: ../../faq/windows.rst:262
msgid ""
"Under any editor, mixing tabs and spaces is a bad idea. MSVC is no "
"different in this respect, and is easily configured to use spaces: Take :"
"menuselection:`Tools --> Options --> Tabs`, and for file type \"Default\" "
"set \"Tab size\" and \"Indent size\" to 4, and select the \"Insert spaces\" "
"radio button."
msgstr ""
"在任何編輯器下,將 tab 和空格混合都是一個壞主意。MSVC 在這方面也是一樣,且可"
"以輕鬆配置為使用空格:選擇\\ :menuselection:`工具 --> 選項 --> Tabs`,然後對"
"於「預設」檔案類型,將「Tab 大小」和「縮排大小」設定為 4,然後選擇「插入空"
"格」單選鈕。"
#: ../../faq/windows.rst:267
msgid ""
"Python raises :exc:`IndentationError` or :exc:`TabError` if mixed tabs and "
"spaces are causing problems in leading whitespace. You may also run the :mod:"
"`tabnanny` module to check a directory tree in batch mode."
msgstr ""
"如果混合 tab 和空格造成前導空白字元出現問題,則 Python 會引發 :exc:"
"`IndentationError` 或 :exc:`TabError`。你也可以運行 :mod:`tabnanny` 模組,在"
"批次模式下檢查目錄樹。"
#: ../../faq/windows.rst:274
msgid "How do I check for a keypress without blocking?"
msgstr "如何在不阻塞的情況下檢查 keypress?"
#: ../../faq/windows.rst:276
msgid ""
"Use the :mod:`msvcrt` module. This is a standard Windows-specific extension "
"module. It defines a function ``kbhit()`` which checks whether a keyboard "
"hit is present, and ``getch()`` which gets one character without echoing it."
msgstr ""
"使用 :mod:`msvcrt` 模組。這是一個標準的 Windows 專用擴充模組。它定義了一個函"
"式 ``kbhit()``,該函式會檢查是否出現鍵盤打擊 (keyboard hit),以及函式 "
"``getch()``,該函式會取得一個字元且不會將其印出。"
#: ../../faq/windows.rst:281
msgid "How do I solve the missing api-ms-win-crt-runtime-l1-1-0.dll error?"
msgstr "如何解決遺漏 api-ms-win-crt-runtime-l1-1-0.dll 的錯誤?"
#: ../../faq/windows.rst:283
msgid ""
"This can occur on Python 3.5 and later when using Windows 8.1 or earlier "
"without all updates having been installed. First ensure your operating "
"system is supported and is up to date, and if that does not resolve the "
"issue, visit the `Microsoft support page <https://support.microsoft.com/en-"
"us/help/3118401/>`_ for guidance on manually installing the C Runtime update."
msgstr ""
"使用 Windows 8.1 或更早版本時,若尚未安裝所有的更新,則可能會在 Python 3.5 以"
"上的版本發生這種情況。首先要確保你的作業系統仍受支援並且是最新的,如果這無法"
"解決問題,請造訪 `Microsoft 支援頁面 <https://support.microsoft.com/en-us/"
"help/3118401/>`_\\ 以取得關於手動安裝 C Runtime 更新的指南。"
#~ msgid "or::"
#~ msgstr ""
#~ "或是:\n"
#~ "\n"
#~ "::"
#~ msgid ""
#~ "This series of screencasts aims to get you up and running with Python on "
#~ "Windows XP. The knowledge is distilled into 1.5 hours and will get you "
#~ "up and running with the right Python distribution, coding in your choice "
#~ "of IDE, and debugging and writing solid code with unit-tests."
#~ msgstr ""
#~ "這一組影片教學可以讓你在 Windows XP 上順利使用 Python。整組課程大約需要你"
#~ "一個半小時的時間。課程包含安裝正確的 Python 版本,在你喜歡的 IDE 中進行開"
#~ "發,除錯,以及對程式進行單元測試以生產可靠的程式。"