Commit | Line | Data |
---|---|---|
cb700bcc FC |
1 | # from sys import platform |
2 | # from os import environ, system | |
3 | # from webbrowser import open_new_tab | |
8ee66edd FC |
4 | |
5 | ||
cb700bcc | 6 | # class BrowserStrategy: |
8ee66edd | 7 | |
cb700bcc FC |
8 | # @staticmethod |
9 | # def open(url): open_new_tab(url) | |
8ee66edd FC |
10 | |
11 | ||
cb700bcc | 12 | # class BrowserStrategyLinux(BrowserStrategy): |
8ee66edd | 13 | |
cb700bcc FC |
14 | # @staticmethod |
15 | # def open(url): | |
16 | # environ['LD_LIBRARY_PATH'] = '' | |
17 | # system('xdg-open ' + url) | |
8ee66edd FC |
18 | |
19 | ||
cb700bcc | 20 | # class Browser: |
8ee66edd | 21 | |
cb700bcc FC |
22 | # @staticmethod |
23 | # def open(url): | |
24 | # cls = BrowserStrategyLinux if platform.startswith('linux') else \ | |
25 | # BrowserStrategy | |
26 | # cls.open(url) |