'Create a new history accessor.
Parameters
profile : str
The name of the profile from which to open history.
hist_file : str
Path to an SQLite history database stored by IPython. If specified,
hist_file overrides profile.
config : :class:`~traitlets.config.loader.Config`
Config object. hist_file can also be set through this.'

def __init__(self, profile='default', hist_file=u'', **traits):

    super(HistoryAccessor, self).__init__(**traits)
    if hist_file:
        self.hist_file = hist_file
    if (self.hist_file == u''):
        self.hist_file = self._get_hist_file_name(profile)
    if ((sqlite3 is None) and self.enabled):
        warn('IPython    History    requires    SQLite,    your    history    will    not    be    saved')
        self.enabled = False
    self.init_db()
