def button_action(self): entry = self.entry.get() if os.path.isdir(entry): logger.info(f'opening {entry}.') editor = get_editor(self) editor.project_handler = ProjectHandler.get_project_handler(directory=entry) self.destroy() else: self.msg.set(f'{entry} is not a file!')
def info(self, value): name, soundfile = value logger.debug(f'got {value}') l = self.soundfiles_listbox.get(0, tk.END) if name in l: ind = np.where(np.array(l) == name) else: ind = len(l) self.soundfiles_listbox.insert(ind, name) self._info_dict[name] = soundfile get_editor(self).project_handler.sound_files = self._info_dict
def button_action(self): try: entry = self.entry.get() scr = os.environ[mv_scratch_key] project_dir = f'{scr}/{entry}' logger.info(f'creating {project_dir}') os.mkdir(project_dir) editor = get_editor(self) editor.project_handler = ProjectHandler(entry, project_dir) self.destroy() except OSError as e: self.msg.set(e)
def _parse_info_to_ph(self): logger.debug(f'parsing {self._info_dict} to ProjectHandler') get_editor(self).project_handler.pictures = self._info_dict
def _save_project(self): editor = get_editor(self) editor.project_handler.save_me()