"netrc" --- netrc file processing
*********************************

**ソースコード:** Lib/netrc.py

======================================================================

"netrc" クラスは、Unix **ftp** プログラムや他の FTP クライアントで用い
られる netrc ファイル形式を解析し、カプセル化 (encapsulate) します。

class netrc.netrc([file])

   "netrc" のインスタンスやサブクラスのインスタンスは netrc ファイルの
   データをカプセル化します。 初期化の際の引数が存在する場合、解析対象
   となるファイルの指定になります。 引数がない場合、
   ("os.path.expanduser()" で特定される) ユーザのホームディレクトリ下
   にある ".netrc" が読み出されます。ファイルが見付からなかった場合は
   "FileNotFoundError" 例外が送出されます。 解析エラーが発生した場合、
   ファイル名、行番号、解析を中断したトークンに関する情報の入った
   "NetrcParseError" を送出します。 POSIX システムにおいて引数を指定し
   ない場合、ファイルのオーナシップやパーミッションが安全でない (プロ
   セスを実行しているユーザ以外が所有者であるか、誰にでも読み書き出来
   てしまう) のに ".netrc" ファイル内にパスワードが含まれていると、
   "NetrcParseError" を送出します。 このセキュリティ的な振る舞いは、
   ftp などの ".netrc" を使うプログラムと同じものです。

   バージョン 3.4 で変更: POSIX パーミッションのチェックが追加されまし
   た。

   バージョン 3.7 で変更: 引数で *file* が渡されなかったときは、
   ".netrc" ファイルの場所を探すのに "os.path.expanduser()" が使われる
   ようになりました。

   バージョン 3.10 で変更: "netrc" try UTF-8 encoding before using
   locale specific encoding. The entry in the netrc file no longer
   needs to contain all tokens.  The missing tokens' value default to
   an empty string.  All the tokens and their values now can contain
   arbitrary characters, like whitespace and non-ASCII characters. If
   the login name is anonymous, it won't trigger the security check.

exception netrc.NetrcParseError

   Exception raised by the "netrc" class when syntactical errors are
   encountered in source text.  Instances of this exception provide
   three interesting attributes:

   msg

      Textual explanation of the error.

   filename

      The name of the source file.

   lineno

      The line number on which the error was found.


netrc オブジェクト
==================

"netrc" インスタンスは以下のメソッドを持っています:

netrc.authenticators(host)

   *host* の認証情報として、三要素のタプル  "(login, account,
   password)" を返します。与えられた host に対するエントリが netrc フ
   ァイルにない場合、'default' エントリに関連付けられたタプルが返され
   ます。host に対応するエントリがなく、default エントリもない場合、
   "None" を返します。

netrc.__repr__()

   クラスの持っているデータを netrc ファイルの書式に従った文字列で出力
   します。(コメントは無視され、エントリが並べ替えられる可能性がありま
   す。)

"netrc" のインスタンスは以下の public なインスタンス変数を持っています
:

netrc.hosts

   ホスト名を "(login, account, password)" からなるタプルに対応づけて
   いる辞書です。'default' エントリがある場合、その名前の擬似ホスト名
   として表現されます。

netrc.macros

   マクロ名を文字列のリストに対応付けている辞書です。
