Launch a configured game as a child process. More...
Public Member Functions | |
| int|None | process_id (self) |
| Return the active child process id, if one exists. | |
| None | launch (self, GameDefinition game, Sequence[str]|None command=None, Callable[[], None]|None on_exit=None) |
| Launch a game as a managed child process. | |
| None | stop (self) |
| Stop the currently running game, if any. | |
| bool | is_running (self) |
| Return whether the launched game process is alive. | |
Launch a configured game as a child process.
| bool games.game_launcher.GameLauncher.is_running | ( | self | ) |
Return whether the launched game process is alive.
Reimplemented from games.game_launcher_if.GameLauncherIf.
| None games.game_launcher.GameLauncher.launch | ( | self, | |
| GameDefinition | game, | ||
| Sequence[str] | None | command = None, |
||
| Callable[[], None] | None | on_exit = None |
||
| ) |
Launch a game as a managed child process.
| game | Configured game definition to launch. |
| command | Optional concrete command override. When omitted, use the command from the game definition. |
| on_exit | Optional callback invoked after the child process exits. |
Reimplemented from games.game_launcher_if.GameLauncherIf.