Skip to content

Commit

Permalink
Merge pull request #7791 from radarhere/imageshow
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Mar 11, 2024
2 parents 93bf991 + 373c62e commit fc30eba
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/PIL/ImageShow.py
Expand Up @@ -138,6 +138,17 @@ def get_command(self, file: str, **options: Any) -> str:
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)
Expand Down

0 comments on commit fc30eba

Please sign in to comment.