t.n.hosts : module documentation

Part of twisted.names View Source

hosts(5) support.
Function searchFileForAll Search the given file, which is in hosts(5) standard format, for an address entry with a given name.
Function searchFileFor Grep given file, which is in hosts(5) standard format, for an address entry with a given name.
Class Resolver A resolver that services hosts(5) format files.
def searchFileForAll(hostsFile, name): (source)
Search the given file, which is in hosts(5) standard format, for an address entry with a given name.
ParametershostsFileThe name of the hosts(5)-format file to search. (type: FilePath)
nameThe name to search for. (type: str)
ReturnsNone if the name is not found in the file, otherwise a str giving the address in the file associated with the name.
def searchFileFor(file, name): (source)
Grep given file, which is in hosts(5) standard format, for an address entry with a given name.
ParametersfileThe name of the hosts(5)-format file to search.
nameThe name to search for. (type: str)
ReturnsNone if the name is not found in the file, otherwise a str giving the address in the file associated with the name.
API Documentation for Twisted, generated by pydoctor at 2013-11-08 22:07:30.