Exemplo n.º 1
0
Arquivo: widgets.py Projeto: e-sr/KG
    def from_local_folder(cls, path, config_file):
        author, ok = QtGui.QInputDialog.getText(None, "Set author", "Please your name : ")
        if ok:
            author = author.replace(' ', '_')
            if author == "":
                author = 'anonymus'
        else:
            author = 'anonymus'

        QtGui.QMessageBox.warning(None, 'Audio system',
                                  'Please use hearphones or a good audio system to analyze the signals.')

        obs_dict = pickle.load(config_file)
        obs = [Observation.from_dict(d) for k, d in obs_dict.items()]
        return cls(observations=obs, author=author, local=True)