'Initialize a resolver instance.
@param filename: The filename of a configuration file in
standard /etc/resolv.conf format.  This parameter is meaningful
only when I{configure} is true and the platform is POSIX.
@type filename: string or file object
@param configure: If True (the default), the resolver instance
is configured in the normal fashion for the operating system
the resolver is running on.  (I.e. a /etc/resolv.conf file on
POSIX systems and from the registry on Windows systems.)
@type configure: bool'

def __init__(self, filename='/etc/resolv.conf', configure=True):

    self.reset()
    if configure:
        if (sys.platform == 'win32'):
            self.read_registry()
        elif filename:
            self.read_resolv_conf(filename)
