'Reset the namespace by removing all names defined by the user.'

def reset_namespace(self, force=False):

    reset_str = _('Reset    IPython    namespace')
    warn_str = _('All    user-defined    variables    will    be    removed.<br>Are    you    sure    you    want    to    reset    the    namespace?')
    if (not force):
        reply = QMessageBox.question(self, reset_str, warn_str, (QMessageBox.Yes | QMessageBox.No))
        if (reply == QMessageBox.Yes):
            if self._reading:
                self.dbg_exec_magic('reset', '-f')
            else:
                self.execute('%reset    -f')
    elif self._reading:
        self.dbg_exec_magic('reset', '-f')
    else:
        self.silent_execute('%reset    -f')
