mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-26 16:03:08 +03:00
Fallback to python3
This commit is contained in:
parent
a0b22d2203
commit
527eecae80
|
@ -178,10 +178,11 @@ class MacViewer(Viewer):
|
||||||
else:
|
else:
|
||||||
raise TypeError("Missing required argument: 'path'")
|
raise TypeError("Missing required argument: 'path'")
|
||||||
subprocess.call(["open", "-a", "Preview.app", path])
|
subprocess.call(["open", "-a", "Preview.app", path])
|
||||||
if sys.executable:
|
exectable = sys.executable or shutil.which("python3")
|
||||||
|
if executable:
|
||||||
subprocess.Popen(
|
subprocess.Popen(
|
||||||
[
|
[
|
||||||
sys.executable,
|
executable,
|
||||||
"-c",
|
"-c",
|
||||||
"import os, sys, time; time.sleep(20); os.remove(sys.argv[1])",
|
"import os, sys, time; time.sleep(20); os.remove(sys.argv[1])",
|
||||||
path,
|
path,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user