Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/test/test_webbrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def test_default_open(self):
url = "https://python.org"
self.browser.open(url)
self.assertTrue(self.popen_pipe._closed)
self.assertEqual(self.popen_pipe.cmd, "osascript")
self.assertEqual(self.popen_pipe.cmd, "/usr/bin/osascript")
script = self.popen_pipe.pipe.getvalue()
self.assertEqual(script.strip(), f'open location "{url}"')

Expand Down
2 changes: 1 addition & 1 deletion Lib/turtledemo/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def __init__(self, filename=None):
# so that our menu bar appears.
subprocess.run(
[
'osascript',
'/usr/bin/osascript',
'-e', 'tell application "System Events"',
'-e', 'set frontmost of the first process whose '
'unix id is {} to true'.format(os.getpid()),
Expand Down
2 changes: 1 addition & 1 deletion Lib/webbrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ def open(self, url, new=0, autoraise=True):
end
'''

osapipe = os.popen("osascript", "w")
osapipe = os.popen("/usr/bin/osascript", "w")
if osapipe is None:
return False

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Invoke osascript with absolute path.
Loading