Class for all browsers which are to be started in the background.
| 200 | |
| 201 | |
| 202 | class 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 | |
| 222 | class UnixBrowser(BaseBrowser): |
no outgoing calls
no test coverage detected
searching dependent graphs…