mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	 f8316638af
			
		
	
	
		f8316638af
		
	
	
	
	
		
			
			SourceForge doesn't choke on this batch :-)
I'm not entirely sure this is 100% correct. The patch changes an
\index{persistency} to \index{presistence}, and I don't know what \index{}
does. But it seems to do so persi--er, consistently, so I hope it isn't a
problem.
		
	
			
		
			
				
	
	
		
			53 lines
		
	
	
	
		
			1.9 KiB
		
	
	
	
		
			TeX
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
	
		
			1.9 KiB
		
	
	
	
		
			TeX
		
	
	
	
	
	
| \section{\module{netrc} ---
 | |
|          netrc file processing}
 | |
| 
 | |
| \declaremodule{standard}{netrc}
 | |
| % Note the \protect needed for \file... ;-(
 | |
| \modulesynopsis{Loading of \protect\file{.netrc} files.}
 | |
| \moduleauthor{Eric S. Raymond}{esr@snark.thyrsus.com}
 | |
| \sectionauthor{Eric S. Raymond}{esr@snark.thyrsus.com}
 | |
| 
 | |
| 
 | |
| \versionadded{1.5.2}
 | |
| 
 | |
| 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 encapsulates data from 
 | |
| 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}}
 | |
| 
 | |
| A \class{netrc} instance has the following methods:
 | |
| 
 | |
| \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__}{}
 | |
| Dump the class data as a string in the format of a netrc file.
 | |
| (This discards comments and may reorder the entries.)
 | |
| \end{methoddesc}
 | |
| 
 | |
| Instances of \class{netrc} have public instance variables:
 | |
| 
 | |
| \begin{memberdesc}{hosts}
 | |
| Dictionary 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}
 |