def _write_keyboard(self, keyboard): if not self._config.has_section('keyboard'): self._config.add_section('keyboard') self._config.set('keyboard', 'mode', Mode.values()[keyboard.mode])
def _write_keyboard(self, keyboard): if not self._config.has_section("keyboard"): self._config.add_section("keyboard") self._config.set("keyboard", "mode", Mode.values()[keyboard.mode])
def _read_keyboard(self, keyboard): if self._config.has_section('keyboard'): mode_name = self._config.get('keyboard', 'mode') if mode_name is not None: keyboard.mode = Mode.names()[mode_name]
def _read_keyboard(self, keyboard): if self._config.has_section("keyboard"): mode_name = self._config.get("keyboard", "mode") if mode_name is not None: keyboard.mode = Mode.names()[mode_name]