'We interpret the name as a key name.'

def __init__(self, filename=None):

    url = urlparse.urlparse(filename, scheme='file')
    self.filename = url.path.replace('/', '\\')
    self.hive = url.netloc
    self.path = self.filename.lstrip('\\')
    try:
        self.root_key = _winreg.CreateKeyEx(getattr(_winreg, self.hive), self.path, 0, _winreg.KEY_ALL_ACCESS)
        self.parsed = self.path
    except exceptions.WindowsError as e:
        logging.debug('Unable    to    open    config    registry    key:    %s', e)
        return
