core.launcher module

Launching of programs, folders, URLs, etc..

core.launcher.get_df_executable()[source]

Returns the path of the executable needed to launch Dwarf Fortress.

core.launcher.open_file(path)[source]

Opens a file with the system default viewer for the respective file type.

Parameters:

path – the file path to open.

core.launcher.open_folder_idx(i)[source]

Opens the folder specified by index i, as listed in PyLNP.json.

Opens the link specified by index i, as listed in PyLNP.json.

core.launcher.open_savegames()[source]

Opens the save game folder.

core.launcher.open_url(url)[source]

Launches a web browser to the Dwarf Fortress webpage.

core.launcher.program_is_running(path, nonchild=False)[source]

Returns True if a program is currently running.

Parameters:
  • path – the path of the program.

  • nonchild – if set to True, attempts to check for the process among all running processes, not just known child processes. Used for DFHack on Linux and OS X; currently unsupported for Windows.

core.launcher.run_df(force=False)[source]

Launches Dwarf Fortress.

core.launcher.run_program(path, force=False, is_df=False, spawn_terminal=False)[source]

Launches an external program.

Parameters:
  • path – the path of the program to launch.

  • spawn_terminal – whether to spawn a new terminal for this app. Used only for DFHack.

core.launcher.toggle_autoclose()[source]

Toggle automatic closing of the UI when launching DF.