rest25/library/netrc.rst => rest262/library/netrc.rst
2:mod:`netrc` --- netrc file processing
3======================================
4
5.. module:: netrc
6   :synopsis: Loading of .netrc files.
7.. moduleauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
8.. sectionauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
9
n10- 
11-.. % Note the \protect needed for \file... ;-(
12
13.. versionadded:: 1.5.2
14
15The :class:`netrc` class parses and encapsulates the netrc file format used by
16the Unix :program:`ftp` program and other FTP clients.
17
18
19.. class:: netrc([file])
37.. _netrc-objects:
38
39netrc Objects
40-------------
41
42A :class:`netrc` instance has the following methods:
43
44
n45-.. method:: XXX Class.authenticators(host)
n43+.. method:: netrc.authenticators(host)
46
47   Return a 3-tuple ``(login, account, password)`` of authenticators for *host*.
48   If the netrc file did not contain an entry for the given host, return the tuple
49   associated with the 'default' entry.  If neither matching host nor default entry
50   is available, return ``None``.
51
52
n53-.. method:: XXX Class.__repr__()
n51+.. method:: netrc.__repr__()
54
55   Dump the class data as a string in the format of a netrc file. (This discards
56   comments and may reorder the entries.)
57
58Instances of :class:`netrc` have public instance variables:
59
60
n61-.. attribute:: XXX Class.hosts
n59+.. attribute:: netrc.hosts
62
63   Dictionary mapping host names to ``(login, account, password)`` tuples.  The
64   'default' entry, if any, is represented as a pseudo-host by that name.
65
66
n67-.. attribute:: XXX Class.macros
n65+.. attribute:: netrc.macros
68
69   Dictionary mapping macro names to string lists.
70
71.. note::
72
t73-   Passwords are limited to a subset of the ASCII character set. Versions of this
t71+   Passwords are limited to a subset of the ASCII character set. Versions of
74-   module prior to 2.3 were extremely limited.  Starting with 2.3, all ASCII
72+   this module prior to 2.3 were extremely limited.  Starting with 2.3, all
75-   punctuation is allowed in passwords.  However, note that whitespace and non-
73+   ASCII punctuation is allowed in passwords.  However, note that whitespace and
76-   printable characters are not allowed in passwords.  This is a limitation of the
74+   non-printable characters are not allowed in passwords.  This is a limitation
77-   way the .netrc file is parsed and may be removed in the future.
75+   of the way the .netrc file is parsed and may be removed in the future.
78
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op