INNER CODE UNIT · Python

_get_play_dir

TacticalMetaphysics/Lisien · elide/elide/app.py:175

	def _get_play_dir(self):
		return os.path.join(self.prefix, self.game_name)

	def _set_play_dir(self, str_or_pair: str | tuple[str, str]):
		if isinstance(str_or_pair, str):
			*a, b = str.split(os.path.sep)
			a = os.path.sep.join(a)
		else:
			a, b = str_or_pair
		self.prefix, self.game_name = a, b

	play_path = AliasProperty(
		_get_play_dir, _set_play_dir, bind=("prefix", "game_name")
	)

	@logwrap
	def on_selection(self, *_):
		Logger.debug("App: {} selected".format(self.selection))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…