mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-23 23:30:34 +03:00
Use subprocess with CREATE_NO_WINDOW flag in WindowsViewer
This commit is contained in:
parent
6782a07b8e
commit
373c62e5cb
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user