cmph/__init__.py
def save(self, output):
        """
        Persist the Minimal Perfect Hash (MPH) to a stream

        Parameters
        ----------
        output : file_like
            The stream to use to persist the MPH

        Raises
        ------
        IOError
            If there is an issue accessing or manipulating the underlying
            stream
        """
        assert self._mph, "There is no MPH ?"
        if isinstance(output, six.string_types):
            with open(abspath(output), 'w') as out:
                _cmph.cmph_dump(self._mph, out)
        else:
            _cmph.cmph_dump(self._mph, output)
def save(self, output):
        """
        Persist the Minimal Perfect Hash (MPH) to a stream

        Parameters
        ----------
        output : file_like
            The stream to use to persist the MPH

        Raises
        ------
        IOError
            If there is an issue accessing or manipulating the underlying
            stream
        """
        assert self._mph, "There is no MPH ?"
        if isinstance(output, six.string_types):
            with open(abspath(output), 'w') as out:
                _cmph.cmph_dump(self._mph, out)
        else:
            _cmph.cmph_dump(self._mph, output)
Persist the Minimal Perfect Hash (MPH) to a stream

        Parameters
        ----------
        output : file_like
            The stream to use to persist the MPH

        Raises
        ------
        IOError
            If there is an issue accessing or manipulating the underlying
            stream