def load(cls, path, stash):
        """
        Load the history from a path.
        :param path: path to load from.
        :type path: str
        :param config: the StaSh core
        :type config: StaSh
        :return: the history loaded from the file
        :rtype: ShHistory
        """
        shh = cls(stash)
        try:
            with open(path, "r", encoding=cls.ENCODING) as fin:
                h = json.loads(u"" + fin.read())
        except ValueError:
            h = {"StaSh.runtime": cls.load_old_format(path)}
        shh._histories = h
        return shh

        Load the history from a path.
        :param path: path to load from.
        :type path: str
        :param config: the StaSh core
        :type config: StaSh
        :return: the history loaded from the file
        :rtype: ShHistory
        
system/shhistory.py