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

Class BackgroundBrowser

Lib/webbrowser.py:202–219  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

200
201
202class BackgroundBrowser(GenericBrowser):
203 """Class for all browsers which are to be started in the
204 background."""
205
206 def open(self, url, new=0, autoraise=True):
207 cmdline = [self.name] + [arg.replace("%s", url)
208 for arg in self.args]
209 sys.audit("webbrowser.open", url)
210 self._check_url(url)
211 try:
212 if sys.platform[:3] == 'win':
213 p = subprocess.Popen(cmdline)
214 else:
215 p = subprocess.Popen(cmdline, close_fds=True,
216 start_new_session=True)
217 return p.poll() is None
218 except OSError:
219 return False
220
221
222class UnixBrowser(BaseBrowser):

Callers 3

getFunction · 0.85
register_X_browsersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…