@@ -15,7 +15,7 @@ msgid ""
15
15
msgstr ""
16
16
"Project-Id-Version : Python 3.7\n "
17
17
"Report-Msgid-Bugs-To : \n "
18
- "POT-Creation-Date : 2019-01-01 10:14 +0900\n "
18
+ "POT-Creation-Date : 2019-04-13 11:09 +0900\n "
19
19
"PO-Revision-Date : 2017-02-16 17:42+0000\n "
20
20
"Last-Translator : Inada Naoki <songofacandy@gmail.com>, 2017\n "
21
21
"Language-Team : Japanese (https://www.transifex.com/python-doc/teams/5390/ja/)\n "
@@ -113,7 +113,7 @@ msgstr ""
113
113
"Python の埋め込みの最も簡単な形式は、超高水準インタフェースの利用です。このインタフェースは、アプリケーションとやり取りする必要がない "
114
114
"Python スクリプトを実行するためのものです。例えばこれは、一つのファイル上で何らかの操作を実現するのに利用できます。 ::"
115
115
116
- #: ../../extending/embedding.rst:77
116
+ #: ../../extending/embedding.rst:78
117
117
msgid ""
118
118
"The :c:func:`Py_SetProgramName` function should be called before "
119
119
":c:func:`Py_Initialize` to inform the interpreter about paths to Python run-"
@@ -135,11 +135,11 @@ msgstr ""
135
135
"コードをファイルから取り出すには、 :c:func:`PyRun_SimpleFile` "
136
136
"関数を使うのがよいでしょう。この関数はメモリを確保して、ファイルの内容をロードする手間を省いてくれます。"
137
137
138
- #: ../../extending/embedding.rst:92
138
+ #: ../../extending/embedding.rst:93
139
139
msgid "Beyond Very High Level Embedding: An overview"
140
140
msgstr "超高水準の埋め込みから踏み出す: 概要"
141
141
142
- #: ../../extending/embedding.rst:94
142
+ #: ../../extending/embedding.rst:95
143
143
msgid ""
144
144
"The high level interface gives you the ability to execute arbitrary pieces "
145
145
"of Python code from your application, but exchanging data values is quite "
@@ -151,7 +151,7 @@ msgstr ""
151
151
"コードの間でのデータのやり取りは、控えめに言っても煩わしいものです。データのやり取りをしたいなら、より低水準のインタフェース呼び出しを利用しなくてはなりません。より多く"
152
152
" C コードを書かねばならない代わりに、ほぼ何でもできるようになります。"
153
153
154
- #: ../../extending/embedding.rst:99
154
+ #: ../../extending/embedding.rst:100
155
155
msgid ""
156
156
"It should be noted that extending Python and embedding Python is quite the "
157
157
"same activity, despite the different intent. Most topics discussed in the "
@@ -162,37 +162,37 @@ msgstr ""
162
162
"の拡張と埋め込みは、趣旨こそ違え、同じ作業であるということに注意せねばなりません。これまでの章で議論してきたトピックのほとんどが埋め込みでもあてはまります。これを示すために、"
163
163
" Python から C への拡張を行うコードが実際には何をするか考えてみましょう:"
164
164
165
- #: ../../extending/embedding.rst:104
165
+ #: ../../extending/embedding.rst:105
166
166
msgid "Convert data values from Python to C,"
167
167
msgstr "データ値を Python から C に変換する。"
168
168
169
- #: ../../extending/embedding.rst:106
169
+ #: ../../extending/embedding.rst:107
170
170
msgid "Perform a function call to a C routine using the converted values, and"
171
171
msgstr "変換された値を使って C ルーチンの関数呼び出しを行い、"
172
172
173
- #: ../../extending/embedding.rst:108
173
+ #: ../../extending/embedding.rst:109
174
174
msgid "Convert the data values from the call from C to Python."
175
175
msgstr "呼び出しで得られたデータ値 C から Python に変換する。"
176
176
177
- #: ../../extending/embedding.rst:110
177
+ #: ../../extending/embedding.rst:111
178
178
msgid "When embedding Python, the interface code does:"
179
179
msgstr "Python を埋め込む場合には、インタフェースコードが行う作業は以下のようになります:"
180
180
181
- #: ../../extending/embedding.rst:112
181
+ #: ../../extending/embedding.rst:113
182
182
msgid "Convert data values from C to Python,"
183
183
msgstr "データ値を C から Python に変換する。"
184
184
185
- #: ../../extending/embedding.rst:114
185
+ #: ../../extending/embedding.rst:115
186
186
msgid ""
187
187
"Perform a function call to a Python interface routine using the converted "
188
188
"values, and"
189
189
msgstr "変換された値を使って Python インタフェースルーチンの関数呼び出しを行い、"
190
190
191
- #: ../../extending/embedding.rst:117
191
+ #: ../../extending/embedding.rst:118
192
192
msgid "Convert the data values from the call from Python to C."
193
193
msgstr "呼び出しで得られたデータ値 Python から C に変換する。"
194
194
195
- #: ../../extending/embedding.rst:119
195
+ #: ../../extending/embedding.rst:120
196
196
msgid ""
197
197
"As you can see, the data conversion steps are simply swapped to accommodate "
198
198
"the different direction of the cross-language transfer. The only difference "
@@ -202,7 +202,7 @@ msgstr ""
202
202
"一見して分かるように、データ変換のステップは、言語間でデータを転送する方向が変わったのに合わせて単に入れ替えただけです。唯一の相違点は、データ変換の間にあるルーチンです。拡張を行う際には"
203
203
" C ルーチンを呼び出しますが、埋め込みの際には Python ルーチンを呼び出します。"
204
204
205
- #: ../../extending/embedding.rst:124
205
+ #: ../../extending/embedding.rst:125
206
206
msgid ""
207
207
"This chapter will not discuss how to convert data from Python to C and vice "
208
208
"versa. Also, proper use of references and dealing with errors is assumed to"
@@ -212,11 +212,11 @@ msgstr ""
212
212
"この章では、Python から C "
213
213
"へ、そしてその逆へとデータを変換する方法については議論しません。また、正しい参照の使い方やエラーの扱い方についてすでに理解しているものと仮定します。これらの側面についてはインタプリタの拡張と何ら変わるところがないので、必要な情報については以前の章を参照できます。"
214
214
215
- #: ../../extending/embedding.rst:133
215
+ #: ../../extending/embedding.rst:134
216
216
msgid "Pure Embedding"
217
217
msgstr "純粋な埋め込み"
218
218
219
- #: ../../extending/embedding.rst:135
219
+ #: ../../extending/embedding.rst:136
220
220
msgid ""
221
221
"The first program aims to execute a function in a Python script. Like in the"
222
222
" section about the very high level interface, the Python interpreter does "
@@ -226,11 +226,11 @@ msgstr ""
226
226
"最初に例示するプログラムは、Python スクリプト内の関数を実行するためのものです。超高水準インタフェースに関する節で挙げた例と同様に、Python "
227
227
"インタプリタはアプリケーションと直接やりとりはしません (が、次の節でやりとりするよう変更します)。"
228
228
229
- #: ../../extending/embedding.rst:140
229
+ #: ../../extending/embedding.rst:141
230
230
msgid "The code to run a function defined in a Python script is:"
231
231
msgstr "Python スクリプト内で定義されている関数を実行するためのコードは以下のようになります:"
232
232
233
- #: ../../extending/embedding.rst:145
233
+ #: ../../extending/embedding.rst:146
234
234
msgid ""
235
235
"This code loads a Python script using ``argv[1]``, and calls the function "
236
236
"named in ``argv[2]``. Its integer arguments are the other values of the "
@@ -243,11 +243,11 @@ msgstr ""
243
243
" <compiling>` し (できた実行可能形式を :program:`call` と呼びましょう)、以下のような Python "
244
244
"スクリプトを実行することにします:"
245
245
246
- #: ../../extending/embedding.rst:160
246
+ #: ../../extending/embedding.rst:161
247
247
msgid "then the result should be:"
248
248
msgstr "実行結果は以下のようになるはずです:"
249
249
250
- #: ../../extending/embedding.rst:168
250
+ #: ../../extending/embedding.rst:169
251
251
msgid ""
252
252
"Although the program is quite large for its functionality, most of the code "
253
253
"is for data conversion between Python and C, and for error reporting. The "
@@ -256,7 +256,7 @@ msgstr ""
256
256
"この程度の機能を実現するにはプログラムがいささか大きすぎますが、ほとんどは Python から C "
257
257
"へのデータ変換やエラー報告のためのコードです。Python の埋め込みという観点から最も興味深い部分は以下のコードから始まる部分です::"
258
258
259
- #: ../../extending/embedding.rst:177
259
+ #: ../../extending/embedding.rst:178
260
260
msgid ""
261
261
"After initializing the interpreter, the script is loaded using "
262
262
":c:func:`PyImport_Import`. This routine needs a Python string as its "
@@ -266,7 +266,7 @@ msgstr ""
266
266
"インタプリタの初期化後、スクリプトは :c:func:`PyImport_Import` を使って読み込まれます。このルーチンは Python "
267
267
"文字列を引数に取る必要があり、データ変換ルーチン :c:func:`PyUnicode_FromString` で構築します。 ::"
268
268
269
- #: ../../extending/embedding.rst:190
269
+ #: ../../extending/embedding.rst:191
270
270
msgid ""
271
271
"Once the script is loaded, the name we're looking for is retrieved using "
272
272
":c:func:`PyObject_GetAttrString`. If the name exists, and the object "
@@ -278,7 +278,7 @@ msgstr ""
278
278
"を使って必要な名前を取得できます。名前がスクリプト中に存在し、取得したオブジェクトが呼び出し可能オブジェクトであれば、このオブジェクトが関数であると考えて差し支えないでしょう。そこでプログラムは定石どおりに引数のタプル構築に進みます。その後、Python"
279
279
" 関数を以下のコードで呼び出します::"
280
280
281
- #: ../../extending/embedding.rst:198
281
+ #: ../../extending/embedding.rst:199
282
282
msgid ""
283
283
"Upon return of the function, ``pValue`` is either *NULL* or it contains a "
284
284
"reference to the return value of the function. Be sure to release the "
@@ -287,11 +287,11 @@ msgstr ""
287
287
"関数が処理を戻す際、 ``pValue`` は *NULL* "
288
288
"になるか、関数の戻り値への参照が入っています。値を調べた後には忘れずに参照を解放してください。"
289
289
290
- #: ../../extending/embedding.rst:206
290
+ #: ../../extending/embedding.rst:207
291
291
msgid "Extending Embedded Python"
292
292
msgstr "埋め込まれた Python の拡張"
293
293
294
- #: ../../extending/embedding.rst:208
294
+ #: ../../extending/embedding.rst:209
295
295
msgid ""
296
296
"Until now, the embedded Python interpreter had no access to functionality "
297
297
"from the application itself. The Python API allows this by extending the "
@@ -308,15 +308,15 @@ msgstr ""
308
308
"Python 拡張モジュールを書くかのように、Python から各ルーチンにアクセスできるようにするグルー(glue, 糊) "
309
309
"コードを書くと考えてください。例えば以下のようにです::"
310
310
311
- #: ../../extending/embedding.rst:245
311
+ #: ../../extending/embedding.rst:246
312
312
msgid ""
313
313
"Insert the above code just above the :c:func:`main` function. Also, insert "
314
314
"the following two statements before the call to :c:func:`Py_Initialize`::"
315
315
msgstr ""
316
316
"上のコードを :c:func:`main` 関数のすぐ上に挿入します。また、以下の二つの文を :c:func:`Py_Initialize` "
317
317
"の呼び出しの前に挿入します::"
318
318
319
- #: ../../extending/embedding.rst:251
319
+ #: ../../extending/embedding.rst:252
320
320
msgid ""
321
321
"These two lines initialize the ``numargs`` variable, and make the "
322
322
":func:`emb.numargs` function accessible to the embedded Python interpreter. "
@@ -325,17 +325,17 @@ msgstr ""
325
325
"これら二つの行は ``numargs`` 変数を初期化し、埋め込み Python インタプリタから :func:`emb.numargs` "
326
326
"関数にアクセスできるようにします。これらの拡張モジュール関数を使うと、 Python スクリプトは以下のようなことができます。"
327
327
328
- #: ../../extending/embedding.rst:260
328
+ #: ../../extending/embedding.rst:261
329
329
msgid ""
330
330
"In a real application, the methods will expose an API of the application to "
331
331
"Python."
332
332
msgstr "実際のアプリケーションでは、こうしたメソッドでアプリケーション内の API を Python に公開することになります。"
333
333
334
- #: ../../extending/embedding.rst:270
334
+ #: ../../extending/embedding.rst:271
335
335
msgid "Embedding Python in C++"
336
336
msgstr "C++による Python の埋め込み"
337
337
338
- #: ../../extending/embedding.rst:272
338
+ #: ../../extending/embedding.rst:273
339
339
msgid ""
340
340
"It is also possible to embed Python in a C++ program; precisely how this is "
341
341
"done will depend on the details of the C++ system used; in general you will "
@@ -347,11 +347,11 @@ msgstr ""
347
347
"一般的には、メインプログラムをC++で書き、C++ コンパイラを使ってプログラムをコンパイル・リンクする必要があるでしょう。 Python 自体を "
348
348
"C++でコンパイルしなおす必要はありません。"
349
349
350
- #: ../../extending/embedding.rst:281
350
+ #: ../../extending/embedding.rst:282
351
351
msgid "Compiling and Linking under Unix-like systems"
352
352
msgstr "Unix 系システムにおけるコンパイルとリンク"
353
353
354
- #: ../../extending/embedding.rst:283
354
+ #: ../../extending/embedding.rst:284
355
355
msgid ""
356
356
"It is not necessarily trivial to find the right flags to pass to your "
357
357
"compiler (and linker) in order to embed the Python interpreter into your "
@@ -362,7 +362,7 @@ msgstr ""
362
362
"に渡すべき正しいフラグを見出すのは簡単でないかもしれません。これは特に、Python がライブラリモジュールに対してリンクされた C 動的拡張 "
363
363
"(:file:`.so` ファイル) として実装されたものをロードする必要があるためです。"
364
364
365
- #: ../../extending/embedding.rst:289
365
+ #: ../../extending/embedding.rst:290
366
366
msgid ""
367
367
"To find out the required compiler and linker flags, you can execute the "
368
368
":file:`python{X.Y}-config` script which is generated as part of the "
@@ -374,19 +374,19 @@ msgstr ""
374
374
"インストール時に生成されたもので、 :file:`python3-config` "
375
375
"スクリプトも利用出来るかもしれません)。このスクリプトにはオプションが多くありますが、直接的に有用なのはこれでしょう:"
376
376
377
- #: ../../extending/embedding.rst:295
377
+ #: ../../extending/embedding.rst:296
378
378
msgid ""
379
379
"``pythonX.Y-config --cflags`` will give you the recommended flags when "
380
380
"compiling:"
381
381
msgstr "``pythonX.Y-config --cflags`` は推奨のコンパイルオプションを出力します:"
382
382
383
- #: ../../extending/embedding.rst:303
383
+ #: ../../extending/embedding.rst:304
384
384
msgid ""
385
385
"``pythonX.Y-config --ldflags`` will give you the recommended flags when "
386
386
"linking:"
387
387
msgstr "``pythonX.Y-config --ldflags`` は推奨のリンクオプションを出力します:"
388
388
389
- #: ../../extending/embedding.rst:312
389
+ #: ../../extending/embedding.rst:313
390
390
msgid ""
391
391
"To avoid confusion between several Python installations (and especially "
392
392
"between the system Python and your own compiled Python), it is recommended "
@@ -396,7 +396,7 @@ msgstr ""
396
396
"複数 Python バージョン共存(とりわけシステムの Python とあなた自身でビルドした Python)での混乱を避けるために、上での例のように "
397
397
":file:`python{X.Y}-config` は絶対パスで起動したほうが良いです。"
398
398
399
- #: ../../extending/embedding.rst:317
399
+ #: ../../extending/embedding.rst:318
400
400
msgid ""
401
401
"If this procedure doesn't work for you (it is not guaranteed to work for all"
402
402
" Unix-like platforms; however, we welcome :ref:`bug reports <reporting-"
0 commit comments