Python 3 Script to Launch Web Browser Using webbrowser Module Full Project For Beginners
Welcome folks today in this post we will be launching web browser
using the webbrowser module in python. All the full source code of application is given below.
Get Started
In order to get started we need to install the following libraries using the pip
command as shown below
pip install webbrowser
After installing the library just make an app.py
file and copy paste the following code
app.py
import webbrowser
c = webbrowser.get()
c.open('http://www.python.org')
Now if you want to open the browser in the new tab
you can modify the python script as shown below
import webbrowser
c = webbrowser.get()
c.open_new_tab('http://docs.python.org')
Now if you execute this python
script by typing the below command
python app.py