python open new chrome tab

Solutions on MaxInterview for python open new chrome tab by the best coders in the world

showing results for - "python open new chrome tab"
Luis
21 Aug 2017
1import webbrowser
2
3url = 'http://docs.python.org/'
4
5# MacOS
6chrome_path = 'open -a /Applications/Google\ Chrome.app %s'
7
8# Windows
9# chrome_path = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s'
10
11# Linux
12# chrome_path = '/usr/bin/google-chrome %s'
13
14webbrowser.get(chrome_path).open(url)
15