mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 01:16:16 +03:00
Merge pull request #7791 from radarhere/imageshow
This commit is contained in:
commit
fc30eba882
|
@ -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