pyra.__init__

Responsible for initialization of RetroArcher.

pyra.initialize(config_file: str) bool[source]

Initialize RetroArcher.

Sets up config, loggers, and http port.

Parameters:
config_filestr

The path to the config file.

Returns:
bool

True if initialize succeeds, otherwise False.

Raises:
SystemExit

If unable to correct possible issues with config file.

Examples

>>> initialize(config_file='config.ini')
True
pyra.stop(exit_code: int | str = 0, restart: bool = False)[source]

Stop RetroArcher.

This function ends the tray icon if it’s running. Then restarts or shutdowns RetroArcher depending on the value of the restart parameter.

Parameters:
exit_codeUnion[int, str], default = 0

The exit code to send. Does not apply if restart = True.

restartbool, default = False

Set to True to restart RetroArcher.

Examples

>>> stop(exit_code=0, restart=False)