MCPcopy Index your code
hub / github.com/python/cpython / open

Method open

Lib/webbrowser.py:599–609  ·  view source on GitHub ↗
(self, url, new=0, autoraise=True)

Source from the content-addressed store, hash-verified

597if sys.platform[:3] == "win":
598 class WindowsDefault(BaseBrowser):
599 def open(self, url, new=0, autoraise=True):
600 sys.audit("webbrowser.open", url)
601 self._check_url(url)
602 try:
603 os.startfile(url)
604 except OSError:
605 # [Error 22] No application is associated with the specified
606 # file for this operation: '<URL>'
607 return False
608 else:
609 return True
610
611#
612# Platform support for macOS

Callers

nothing calls this directly

Calls 1

_check_urlMethod · 0.80

Tested by

no test coverage detected