翻訳: using/cmdline.
@@ -352,8 +352,8 @@ | ||
352 | 352 | |
353 | 353 | .. cmdoption:: -3 |
354 | 354 | |
355 | - Warn about Python 3.x incompatibilities which cannot be fixed trivially by | |
356 | - :ref:`2to3 <2to3-reference>`. Among these are: | |
355 | + Python 3.x との、 :ref:`2to3 <2to3-reference>` によって簡単に解決できない | |
356 | + 互換性の問題について警告します。以下のものが該当します。 | |
357 | 357 | |
358 | 358 | * :meth:`dict.has_key` |
359 | 359 | * :func:`apply` |
@@ -363,148 +363,161 @@ | ||
363 | 363 | * :func:`reduce` |
364 | 364 | * :func:`reload` |
365 | 365 | |
366 | - Using these will emit a :exc:`DeprecationWarning`. | |
366 | + これらを使うと、 :exc:`DeprecationWarning` を発生させます。 | |
367 | 367 | |
368 | 368 | .. versionadded:: 2.6 |
369 | 369 | |
370 | -Options you shouldn't use | |
370 | +使うべきでないオプション | |
371 | 371 | ~~~~~~~~~~~~~~~~~~~~~~~~~ |
372 | 372 | |
373 | 373 | .. cmdoption:: -J |
374 | 374 | |
375 | - Reserved for use by Jython_. | |
375 | + Jython_ のために予約されています。 | |
376 | 376 | |
377 | 377 | .. _Jython: http://jython.org |
378 | 378 | |
379 | 379 | .. cmdoption:: -U |
380 | 380 | |
381 | - Turns all string literals into unicodes globally. Do not be tempted to use | |
382 | - this option as it will probably break your world. It also produces | |
383 | - ``.pyc`` files with a different magic number than normal. Instead, you can | |
384 | - enable unicode literals on a per-module basis by using:: | |
381 | + 全ての文字列リテラルを、全部 unicode にします。 | |
382 | + このオプションはあなたの世界を破壊してしまうかもしれないので、 | |
383 | + このオプションを使おうとしないでください。 | |
384 | + これは、通常とは違うマジックナンバーを使って ``.pyc`` ファイルを生成します。 | |
385 | + ファイルの先頭に次のように書いて、このオプションの代わりにモジュール単位で | |
386 | + unicode リテラルを有効にできます。 :: | |
385 | 387 | |
386 | 388 | from __future__ import unicode_literals |
387 | 389 | |
388 | - at the top of the file. See :mod:`__future__` for details. | |
390 | + 詳細は :mod:`__future__` を参照してください。 | |
389 | 391 | |
392 | + | |
390 | 393 | .. cmdoption:: -X |
391 | 394 | |
392 | - Reserved for alternative implementations of Python to use for their own | |
393 | - purposes. | |
395 | + 別の Python の実装が独自の目的で利用するために予約されています。 | |
394 | 396 | |
395 | 397 | .. _using-on-envvars: |
396 | 398 | |
397 | -Environment variables | |
398 | ---------------------- | |
399 | +環境変数 | |
400 | +--------- | |
399 | 401 | |
400 | -These environment variables influence Python's behavior. | |
402 | +以下の環境変数は Python の動作に影響します。 | |
401 | 403 | |
402 | 404 | .. envvar:: PYTHONHOME |
403 | 405 | |
404 | - Change the location of the standard Python libraries. By default, the | |
405 | - libraries are searched in :file:`{prefix}/lib/python{version}` and | |
406 | - :file:`{exec_prefix}/lib/python{version}`, where :file:`{prefix}` and | |
407 | - :file:`{exec_prefix}` are installation-dependent directories, both defaulting | |
408 | - to :file:`/usr/local`. | |
406 | + 標準 Python ライブラリの場所を変更します。デフォルトでは、ライブラリは | |
407 | + :file:`{prefix}/lib/python{version}` と :file:`{exec_prefix}/lib/python{version}` | |
408 | + から探されます。ここで、 :file:`{prefix}` と :file:`{exec_prefix}` は | |
409 | + インストール依存のディレクトリで、両方共デフォルトでは :file:`/usr/local` | |
410 | + です。 | |
409 | 411 | |
410 | - When :envvar:`PYTHONHOME` is set to a single directory, its value replaces | |
411 | - both :file:`{prefix}` and :file:`{exec_prefix}`. To specify different values | |
412 | - for these, set :envvar:`PYTHONHOME` to :file:`{prefix}:{exec_prefix}`. | |
412 | + :envvar:`PYTHONHOME` が1つのディレクトリに設定されている場合、その値は | |
413 | + :file:`{prefix}` と :file:`{exec_prefix}` の両方を置き換えます。 | |
414 | + それらに別々の値を指定したい場合は、 :envvar:`PYTHONHOME` を | |
415 | + :file:`{prefix}:{exec_prefix}` のように指定します。 | |
413 | 416 | |
414 | 417 | |
415 | 418 | .. envvar:: PYTHONPATH |
416 | 419 | |
417 | - Augment the default search path for module files. The format is the same as | |
418 | - the shell's :envvar:`PATH`: one or more directory pathnames separated by | |
419 | - :data:`os.pathsep` (e.g. colons on Unix or semicolons on Windows). | |
420 | - Non-existent directories are silently ignored. | |
420 | + モジュールファイルのデフォルトの検索パスを追加します。 | |
421 | + この環境変数のフォーマットはシェルの :envvar:`PATH` と同じで、 | |
422 | + :data:`os.pathsep` (Unix ならコロン、 Windows ならセミコロン) | |
423 | + で区切られた1つ以上のディレクトリパスです。 | |
424 | + 存在しないディレクトリは警告なしに無視されます。 | |
421 | 425 | |
422 | - In addition to normal directories, individual :envvar:`PYTHONPATH` entries | |
423 | - may refer to zipfiles containing pure Python modules (in either source or | |
424 | - compiled form). Extension modules cannot be imported from zipfiles. | |
426 | + 通常のディレクトリに加えて、 :envvar:`PYTHONPATH` のエントリはピュアPython | |
427 | + モジュール(ソース形式でもコンパイルされた形式でも) を含む zip ファイルを | |
428 | + 参照することもできます。 | |
429 | + 拡張モジュールは zip ファイルの中から import することはできません。 | |
425 | 430 | |
426 | - The default search path is installation dependent, but generally begins with | |
427 | - :file:`{prefix}/lib/python{version}` (see :envvar:`PYTHONHOME` above). It | |
428 | - is *always* appended to :envvar:`PYTHONPATH`. | |
431 | + デフォルトの検索パスはインストール依存ですが、通常は | |
432 | + :file:`{prefix}/lib/python{version}` で始まります。 (上の :envvar:`PYTHONHOME` | |
433 | + を参照してください。) | |
434 | + これは *常に* :envvar:`PYTHONPATH` に追加されます。 | |
429 | 435 | |
430 | - An additional directory will be inserted in the search path in front of | |
431 | - :envvar:`PYTHONPATH` as described above under | |
432 | - :ref:`using-on-interface-options`. The search path can be manipulated from | |
433 | - within a Python program as the variable :data:`sys.path`. | |
436 | + 上の :ref:`using-on-interface-options` で説明されているように、 | |
437 | + 追加の検索パスディレクトリが :envvar:`PYTHONPATH` の手前に追加されます。 | |
438 | + 検索パスは Python プログラムから :data:`sys.path` 変数として操作することが | |
439 | + できます。 | |
434 | 440 | |
435 | 441 | |
436 | 442 | .. envvar:: PYTHONSTARTUP |
437 | 443 | |
438 | - If this is the name of a readable file, the Python commands in that file are | |
439 | - executed before the first prompt is displayed in interactive mode. The file | |
440 | - is executed in the same namespace where interactive commands are executed so | |
441 | - that objects defined or imported in it can be used without qualification in | |
442 | - the interactive session. You can also change the prompts :data:`sys.ps1` and | |
443 | - :data:`sys.ps2` in this file. | |
444 | + もし読込み可能ファイルの名前であれば、インタラクティブモードで最初のプロンプトを | |
445 | + 表示する前にそのファイル内の Python コマンドを実行します。 | |
446 | + このファイルはインタラクティブコマンドが実行されるのと同じ名前空間の中で | |
447 | + 実行されるので、このファイル内で定義されたり import されたオブジェクトは | |
448 | + インタラクティブセッションから制限無しに利用することができます。 | |
449 | + このファイルで :data:`sys.ps1` と :data:`sys.ps2` を変更してプロンプトを | |
450 | + 変更することもできます。 | |
451 | + | |
444 | 452 | |
445 | 453 | |
446 | 454 | .. envvar:: PYTHONY2K |
447 | 455 | |
448 | - Set this to a non-empty string to cause the :mod:`time` module to require | |
449 | - dates specified as strings to include 4-digit years, otherwise 2-digit years | |
450 | - are converted based on rules described in the :mod:`time` module | |
451 | - documentation. | |
456 | + この変数に空でない文字列を設定すると、 :mod:`time` モジュールが | |
457 | + 文字列で指定される日付に4桁の年を含むことを要求するようになります。 | |
458 | + そうでなければ、2桁の年は :mod:`time` モジュールのドキュメントに書かれている | |
459 | + ルールで変換されます。 | |
452 | 460 | |
453 | 461 | |
454 | 462 | .. envvar:: PYTHONOPTIMIZE |
455 | 463 | |
456 | - If this is set to a non-empty string it is equivalent to specifying the | |
457 | - :option:`-O` option. If set to an integer, it is equivalent to specifying | |
458 | - :option:`-O` multiple times. | |
464 | + この変数に空でない文字列を設定すると、 :option:`-O` | |
465 | + オプションを指定したのと同じになります。 | |
466 | + 整数を指定した場合、 :option:`-O` を複数回指定したのと | |
467 | + 同じになります。 | |
459 | 468 | |
460 | 469 | |
461 | 470 | .. envvar:: PYTHONDEBUG |
462 | 471 | |
463 | - If this is set to a non-empty string it is equivalent to specifying the | |
464 | - :option:`-d` option. If set to an integer, it is equivalent to specifying | |
465 | - :option:`-d` multiple times. | |
472 | + この変数に空でない文字列を設定すると、 :option:`-d` | |
473 | + オプションを指定したのと同じになります。 | |
474 | + 整数を指定した場合、 :option:`-d` を複数回指定したのと | |
475 | + 同じになります。 | |
466 | 476 | |
467 | 477 | |
468 | 478 | .. envvar:: PYTHONINSPECT |
469 | 479 | |
470 | - If this is set to a non-empty string it is equivalent to specifying the | |
471 | - :option:`-i` option. | |
480 | + この変数に空でない文字列を設定すると、 :option:`-i` | |
481 | + オプションを指定したのと同じになります。 | |
472 | 482 | |
473 | - This variable can also be modified by Python code using :data:`os.environ` | |
474 | - to force inspect mode on program termination. | |
483 | + この変数は Python コードから :data:`os.environ` を使って変更して、 | |
484 | + プログラム終了時のインスペクトモードを強制することができます。 | |
475 | 485 | |
476 | 486 | |
477 | 487 | .. envvar:: PYTHONUNBUFFERED |
478 | 488 | |
479 | - If this is set to a non-empty string it is equivalent to specifying the | |
480 | - :option:`-u` option. | |
489 | + この変数に空でない文字列を設定すると、 :option:`-u` | |
490 | + オプションを指定したのと同じになります。 | |
481 | 491 | |
482 | 492 | |
483 | 493 | .. envvar:: PYTHONVERBOSE |
484 | 494 | |
485 | - If this is set to a non-empty string it is equivalent to specifying the | |
486 | - :option:`-v` option. If set to an integer, it is equivalent to specifying | |
487 | - :option:`-v` multiple times. | |
495 | + この変数に空でない文字列を設定すると、 :option:`-v` | |
496 | + オプションを指定したのと同じになります。 | |
497 | + 整数を指定した場合、 :option:`-v` を複数回指定したのと | |
498 | + 同じになります。 | |
488 | 499 | |
489 | 500 | |
490 | 501 | .. envvar:: PYTHONCASEOK |
491 | 502 | |
492 | - If this is set, Python ignores case in :keyword:`import` statements. This | |
493 | - only works on Windows. | |
503 | + この環境変数が設定されていると、 Python は :keyword:`import` | |
504 | + 文で大文字/小文字を区別しません。 | |
505 | + これは Windows でのみ動作します。 | |
494 | 506 | |
495 | 507 | |
496 | 508 | .. envvar:: PYTHONDONTWRITEBYTECODE |
497 | 509 | |
498 | - If this is set, Python won't try to write ``.pyc`` or ``.pyo`` files on the | |
499 | - import of source modules. | |
510 | + この環境変数が設定されていると、 Python はソースモジュールの | |
511 | + import 時に ``.pyc``, ``.pyo`` ファイルを生成しません。 | |
500 | 512 | |
501 | 513 | .. versionadded:: 2.6 |
502 | 514 | |
503 | 515 | .. envvar:: PYTHONIOENCODING |
504 | 516 | |
505 | - Overrides the encoding used for stdin/stdout/stderr, in the syntax | |
506 | - ``encodingname:errorhandler``. The ``:errorhandler`` part is optional and | |
507 | - has the same meaning as in :func:`str.encode`. | |
517 | + stdin/stdout/stderr のエンコーディングを強制します。 | |
518 | + シンタックスは ``encodingname:errorhandler`` です。 | |
519 | + ``:errorhandler`` の部分はオプションで、 :func:`str.encode` | |
520 | + の引数と同じ意味です。 | |
508 | 521 | |
509 | 522 | .. versionadded:: 2.6 |
510 | 523 |
@@ -512,6 +525,8 @@ | ||
512 | 525 | .. envvar:: PYTHONNOUSERSITE |
513 | 526 | |
514 | 527 | If this is set, Python won't add the user site directory to sys.path |
528 | + この環境変数が設定されている場合、 Python はユーザー site ディレクトリを | |
529 | + sys.path に追加しません。 | |
515 | 530 | |
516 | 531 | .. versionadded:: 2.6 |
517 | 532 |
@@ -522,7 +537,7 @@ | ||
522 | 537 | |
523 | 538 | .. envvar:: PYTHONUSERBASE |
524 | 539 | |
525 | - Sets the base directory for the user site directory | |
540 | + ユーザー site ディレクトリのベースディレクトリを設定します。 | |
526 | 541 | |
527 | 542 | .. versionadded:: 2.6 |
528 | 543 |
@@ -533,32 +548,32 @@ | ||
533 | 548 | |
534 | 549 | .. envvar:: PYTHONEXECUTABLE |
535 | 550 | |
536 | - If this environment variable is set, ``sys.argv[0]`` will be set to its | |
537 | - value instead of the value got through the C runtime. Only works on | |
538 | - Mac OS X. | |
551 | + この環境変数が設定されていると、 ``sys.argv[0]`` に、 C ランタイムから | |
552 | + 取得した値の代わりにこの環境変数の値が設定されます。 | |
553 | + Mac OS X でのみ動作します。 | |
539 | 554 | |
540 | 555 | |
541 | -Debug-mode variables | |
556 | +デバッグモード変数 | |
542 | 557 | ~~~~~~~~~~~~~~~~~~~~ |
543 | 558 | |
544 | -Setting these variables only has an effect in a debug build of Python, that is, | |
545 | -if Python was configured with the :option:`--with-pydebug` build option. | |
559 | +以下の環境変数は、 :option:`--with-pydebug` ビルドオプションを指定して | |
560 | +構成されたデバッグビルド版の Python でのみ効果があります。 | |
546 | 561 | |
547 | 562 | .. envvar:: PYTHONTHREADDEBUG |
548 | 563 | |
549 | - If set, Python will print threading debug info. | |
564 | + 設定された場合、 Python はスレッドデバッグ情報を表示します。 | |
550 | 565 | |
551 | 566 | .. versionchanged:: 2.6 |
552 | - Previously, this variable was called ``THREADDEBUG``. | |
567 | + 以前は、この変数は ``THREADDEBUG`` という名前でした。 | |
553 | 568 | |
554 | 569 | .. envvar:: PYTHONDUMPREFS |
555 | 570 | |
556 | - If set, Python will dump objects and reference counts still alive after | |
557 | - shutting down the interpreter. | |
571 | + 設定された場合、 Python はインタプリタのシャットダウン後に残っている | |
572 | + オブジェクトとリファレンスカウントをダンプします。 | |
558 | 573 | |
559 | 574 | |
560 | 575 | .. envvar:: PYTHONMALLOCSTATS |
561 | 576 | |
562 | - If set, Python will print memory allocation statistics every time a new | |
563 | - object arena is created, and on shutdown. | |
577 | + 設定された場合、 Python は、新しいオブジェクトアリーナを作成するときと、 | |
578 | + シャットダウン時に、メモリアロケーション統計情報を表示します。 | |
564 | 579 |