Teoman Yüksel Teoman Yüksel - 1 year ago 89
Python Question

Python 3 - webbrowser module - open() function

i write a piece of code in python, im a beginner and im learning modules.

import webbrowser as ac

it works correctly but when i run that, site is opening in internet explorer.
i want to make it opened with google chrome. Is any parameter to change browser? or i need something else?

Answer Source

Simply grab the appropriate controller instance and open the url with that:

import webbrowser as ac

chrome =ac.get('chrome')