Adjust markup to match current conventions, and make it formattable.

This commit is contained in:
Fred Drake 1998-12-22 18:24:13 +00:00
parent 768ac6b804
commit 1189fa98eb
2 changed files with 50 additions and 41 deletions

View file

@ -1,30 +1,35 @@
% Module and documentation by Eric S. Raymond, 21 Dec 1998
\section{Standard Module \module{netrc}}
\stmodindex{netrc}
\label{module-netrc}
The \code{netrc} class parses and encapsulates the netrc file format
used by Unix's ftp(1) and other FTP clientd
\section{\module{netrc} ---
\file{.netrc} processing}
\declaremodule{standard}{netrc}
\moduleauthor{Eric S. Raymond}{esr@snark.thyrsus.com}
\sectionauthor{Eric S. Raymond}{esr@snark.thyrsus.com}
The \class{netrc} class parses and encapsulates the netrc file format
used by the \UNIX{} \program{ftp} program and other FTP clients.
\begin{classdesc}{netrc}{\optional{file}}
A \class{netrc} instance or subclass instance enapsulates data from
a netrc file. The initialization argument, if present, specifies the file
to parse. If no argument is given, the file .netrc in the user's home
directory will be read. Parse errors will throw a SyntaxError
exception with associated diagnostic information including the file
a netrc file. The initialization argument, if present, specifies the
file to parse. If no argument is given, the file \file{.netrc} in the
user's home directory will be read. Parse errors will raise
\exception{SyntaxError} with diagnostic information including the file
name, line number, and terminating token.
\end{classdesc}
\subsection{netrc Objects}
\label{netrc-objects}
\subsection{netrc Objects \label{netrc-objects}}
A \class{netrc} instance has the following methods:
\begin{methoddesc}{authenticators}{}
Return a 3-tuple (login, account, password) of authenticators for the
given host. If the netrc file did not contain an entry for the given
host, return the tuple associated with the `default' entry. If
neither matching host nor default entry is available, return None.
\begin{methoddesc}{authenticators}{host}
Return a 3-tuple \code{(\var{login}, \var{account}, \var{password})}
of authenticators for \var{host}. If the netrc file did not
contain an entry for the given host, return the tuple associated with
the `default' entry. If neither matching host nor default entry is
available, return \code{None}.
\end{methoddesc}
\begin{methoddesc}{__repr__}{host}
@ -35,13 +40,11 @@ Dump the class data as a string in the format of a netrc file.
Instances of \class{netrc} have public instance variables:
\begin{memberdesc}{hosts}
Dictionmary mapping host names to login/account/password tuples. The
`default' entry, if any, is represented as a pseudo-host by that name.
Dictionmary mapping host names to \code{(\var{login}, \var{account},
\var{password})} tuples. The `default' entry, if any, is represented
as a pseudo-host by that name.
\end{memberdesc}
\begin{memberdesc}{macros}
Dictionary mapping macro names to string lists.
\end{memberdesc}