in sparkey/__init__.py [0:0]
def __init__(self, hashfile, logfile):
"""Opens a hash file and log file for reading.
@param hashfile: Hash file to open, must exist and be
associated with the log file.
@param logfile: Log file to open, must exist.
"""
hashfile = _to_bytes(hashfile, "hashfile")
logfile = _to_bytes(logfile, "logfile")
reader = _ptr()
self._reader = reader
self._iter = None
_hash_open(_byref(reader), hashfile, logfile)
self._iter = HashIterator(self)