@@ -208,6 +208,8 @@ msgid ""
208
208
"Convert the given path specification to a regular expression for use with :"
209
209
"func:`re.match`. The path specification can contain shell-style wildcards."
210
210
msgstr ""
211
+ "与えられたパスの仕様を :func:`re.match` で利用するための正規表現に変換しま"
212
+ "す。シェル形式のワイルドカードを含めることもできます。"
211
213
212
214
#: ../../library/glob.rst:131
213
215
msgid "For example:"
@@ -219,30 +221,44 @@ msgid ""
219
221
"`fnmatch.translate`. By default wildcards do not match path separators, and "
220
222
"``*`` pattern segments match precisely one path segment."
221
223
msgstr ""
224
+ ":func:`fnmatch.translate` と違って、この関数ではパスの要素を区切るセパレータ"
225
+ "とセグメントには意味があります。デフォルトでは、ワイルドカードはパスのセパ"
226
+ "レータにはマッチしません。また ``*`` パターンのセグメントは厳密に単一のパスの"
227
+ "セグメントにマッチします。"
222
228
223
229
#: ../../library/glob.rst:146
224
230
msgid ""
225
231
"If *recursive* is true, the pattern segment \" ``**``\" will match any number "
226
232
"of path segments."
227
233
msgstr ""
234
+ "*recursive* が真の場合、パターンセグメント \" ``**``\" は任意の数のパスセグメ"
235
+ "ントにマッチします。"
228
236
229
237
#: ../../library/glob.rst:149
230
238
msgid ""
231
239
"If *include_hidden* is true, wildcards can match path segments that start "
232
240
"with a dot (``.``)."
233
241
msgstr ""
242
+ "*include_hidden* が真の場合、ワイルドカードはドット (``.``) で始まるパスセグ"
243
+ "メントにもマッチします。"
234
244
235
245
#: ../../library/glob.rst:152
236
246
msgid ""
237
247
"A sequence of path separators may be supplied to the *seps* argument. If not "
238
248
"given, :data:`os.sep` and :data:`~os.altsep` (if available) are used."
239
249
msgstr ""
250
+ "パスの要素を区切るセパレータのシーケンスを *seps* 引数に渡すことができます。"
251
+ "渡さない場合は :data:`os.sep` と (もしあれば) :data:`~os.altsep` が使われま"
252
+ "す。"
240
253
241
254
#: ../../library/glob.rst:157
242
255
msgid ""
243
256
":meth:`pathlib.PurePath.full_match` and :meth:`pathlib.Path.glob` methods, "
244
257
"which call this function to implement pattern matching and globbing."
245
258
msgstr ""
259
+ ":meth:`pathlib.PurePath.full_match` と :meth:`pathlib.Path.glob` の2つのメ"
260
+ "ソッドは、それぞれパターンマッチと glob 相当の操作を実装するためにこの関数を"
261
+ "呼んでいます。"
246
262
247
263
#: ../../library/glob.rst:165
248
264
msgid "Examples"
@@ -255,6 +271,10 @@ msgid ""
255
271
"the file :file:`3.txt`. :func:`glob` will produce the following results. "
256
272
"Notice how any leading components of the path are preserved. ::"
257
273
msgstr ""
274
+ "次のファイルを含むディレクトリを考えます: :file:`1.gif`, :file:`2.txt`, :"
275
+ "file:`card.gif` および:file:`3.txt` だけを含む :file:`sub` サブディレクトリ。"
276
+ "このとき、 :func:`glob` は以下の結果を返します。パスにおける先頭の要素がどの"
277
+ "ように保持されるかに注意してください::"
258
278
259
279
#: ../../library/glob.rst:173
260
280
msgid ""
@@ -270,6 +290,17 @@ msgid ""
270
290
">>> glob.glob('./**/', recursive=True)\n"
271
291
"['./', './sub/']"
272
292
msgstr ""
293
+ ">>> import glob\n"
294
+ ">>> glob.glob('./[0-9].*')\n"
295
+ "['./1.gif', './2.txt']\n"
296
+ ">>> glob.glob('*.gif')\n"
297
+ "['1.gif', 'card.gif']\n"
298
+ ">>> glob.glob('?.gif')\n"
299
+ "['1.gif']\n"
300
+ ">>> glob.glob('**/*.txt', recursive=True)\n"
301
+ "['2.txt', 'sub/3.txt']\n"
302
+ ">>> glob.glob('./**/', recursive=True)\n"
303
+ "['./', './sub/']"
273
304
274
305
#: ../../library/glob.rst:185
275
306
msgid ""
@@ -289,11 +320,18 @@ msgid ""
289
320
">>> glob.glob('.c*')\n"
290
321
"['.card.gif']"
291
322
msgstr ""
323
+ ">>> import glob\n"
324
+ ">>> glob.glob('*.gif')\n"
325
+ "['card.gif']\n"
326
+ ">>> glob.glob('.c*')\n"
327
+ "['.card.gif']"
292
328
293
329
#: ../../library/glob.rst:196
294
330
msgid ""
295
331
"The :mod:`fnmatch` module offers shell-style filename (not path) expansion."
296
332
msgstr ""
333
+ ":mod:`fnmatch` モジュールは、シェル形式の (パスではなく) ファイル名の展開機能"
334
+ "を提供します。"
297
335
298
336
#: ../../library/glob.rst:199
299
337
msgid "The :mod:`pathlib` module offers high-level path objects."
0 commit comments