MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / open

Method open

tools/python-3.11.9-amd64/Lib/webbrowser.py:173–184  ·  view source on GitHub ↗
(self, url, new=0, autoraise=True)

Source from the content-addressed store, hash-verified

171 self.basename = os.path.basename(self.name)
172
173 def open(self, url, new=0, autoraise=True):
174 sys.audit("webbrowser.open", url)
175 cmdline = [self.name] + [arg.replace("%s", url)
176 for arg in self.args]
177 try:
178 if sys.platform[:3] == 'win':
179 p = subprocess.Popen(cmdline)
180 else:
181 p = subprocess.Popen(cmdline, close_fds=True)
182 return not p.wait()
183 except OSError:
184 return False
185
186
187class BackgroundBrowser(GenericBrowser):

Callers

nothing calls this directly

Calls 2

waitMethod · 0.95
replaceMethod · 0.45

Tested by

no test coverage detected