Merge pull request #7791 from radarhere/imageshow

This commit is contained in:
Hugo van Kemenade 2024-03-11 17:48:31 +02:00 committed by GitHub
commit fc30eba882
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -138,6 +138,17 @@ class WindowsViewer(Viewer):
f'&& del /f "{file}"'
)
def show_file(self, path: str, **options: Any) -> int:
"""
Display given file.
"""
subprocess.Popen(
self.get_command(path, **options),
shell=True,
creationflags=getattr(subprocess, "CREATE_NO_WINDOW"),
) # nosec
return 1
if sys.platform == "win32":
register(WindowsViewer)