Skip to content

Commit

Permalink
Fallback to python3
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere authored and bryant1410 committed Jul 5, 2022
1 parent a0b22d2 commit 527eeca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/PIL/ImageShow.py
Expand Up @@ -178,10 +178,11 @@ def show_file(self, path=None, **options):
else:
raise TypeError("Missing required argument: 'path'")
subprocess.call(["open", "-a", "Preview.app", path])
if sys.executable:
exectable = sys.executable or shutil.which("python3")
if executable:
subprocess.Popen(
[
sys.executable,
executable,
"-c",
"import os, sys, time; time.sleep(20); os.remove(sys.argv[1])",
path,
Expand Down

0 comments on commit 527eeca

Please sign in to comment.