'Open the project located in `path`'

def open_project(self, path=None, restart_consoles=True, save_previous_files=True):

    if (path is None):
        basedir = get_home_dir()
        path = getexistingdirectory(parent=self, caption=_('Open    project'), basedir=basedir)
        if (not self.is_valid_project(path)):
            if path:
                QMessageBox.critical(self, _('Error'), (_('<b>%s</b>    is    not    a    Spyder    project!') % path))
            return
        else:
            self.add_to_recent(path)
    if (self.current_active_project is None):
        if save_previous_files:
            self.editor.save_open_files()
        self.editor.set_option('last_working_dir', getcwd())
        self.show_explorer()
    else:
        self.set_project_filenames(self.editor.get_open_filenames())
    self.current_active_project = EmptyProject(path)
    self.latest_project = EmptyProject(path)
    self.set_option('current_project_path', self.get_active_project_path())
    self.setup_menu_actions()
    self.sig_project_loaded.emit(path)
    self.pythonpath_changed.emit()
    if restart_consoles:
        self.restart_consoles()
