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

Method open

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

Source from the content-addressed store, hash-verified

185 self.basename = os.path.basename(self.name)
186
187 def open(self, url, new=0, autoraise=True):
188 sys.audit("webbrowser.open", url)
189 self._check_url(url)
190 cmdline = [self.name] + [arg.replace("%s", url)
191 for arg in self.args]
192 try:
193 if sys.platform[:3] == 'win':
194 p = subprocess.Popen(cmdline)
195 else:
196 p = subprocess.Popen(cmdline, close_fds=True)
197 return not p.wait()
198 except OSError:
199 return False
200
201
202class BackgroundBrowser(GenericBrowser):

Callers

nothing calls this directly

Calls 3

waitMethod · 0.95
_check_urlMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected