module documentation
(source)

hosts(5) support.

Function searchFileForAll Search the given file, which is in hosts(5) standard format, for addresses associated 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 addresses associated with a given name.

ParametershostsFileThe name of the hosts(5)-format file to search. (type: FilePath)
nameThe name to search for. (type: bytes)
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. (type: str or bytes)
nameThe name to search for. (type: bytes)
ReturnsNone if the name is not found in the file, otherwise a str giving the first address in the file associated with the name.
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.