gui.editor.folder_argv

gui.editor.folder_argv(path, platform=None)

The argument list that shows a directory in the file manager.

Parameters

Name Type Description Default
path Path | str The directory. required
platform str | None The platform name. Defaults to sys.platform. None

Returns

Name Type Description
list[str] list[str]: open on macOS (Finder), explorer on Windows and xdg-open elsewhere, followed by the directory. Never a shell string.

Examples

from spotregen.gui.editor import folder_argv

print(folder_argv("/work/demo/regen/runs", "darwin"))
print(folder_argv("/work/demo/regen/runs", "linux"))
['open', '/work/demo/regen/runs']
['xdg-open', '/work/demo/regen/runs']