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

Class BackgroundBrowser

tools/python-3.11.9-amd64/Lib/webbrowser.py:187–203  ·  view source on GitHub ↗

Class for all browsers which are to be started in the background.

Source from the content-addressed store, hash-verified

185
186
187class BackgroundBrowser(GenericBrowser):
188 """Class for all browsers which are to be started in the
189 background."""
190
191 def open(self, url, new=0, autoraise=True):
192 cmdline = [self.name] + [arg.replace("%s", url)
193 for arg in self.args]
194 sys.audit("webbrowser.open", url)
195 try:
196 if sys.platform[:3] == 'win':
197 p = subprocess.Popen(cmdline)
198 else:
199 p = subprocess.Popen(cmdline, close_fds=True,
200 start_new_session=True)
201 return (p.poll() is None)
202 except OSError:
203 return False
204
205
206class UnixBrowser(BaseBrowser):

Callers 3

getFunction · 0.85
register_X_browsersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected