Opening Number Of Websites Using Python

So you just started in python programming, and want to prank your arch nemesis. Here i will t...


Opening Number Of Websites Using Python

So you just started in python programming, and want to prank your arch nemesis. Here i will teach you how to open any website on his computer using python.

Before you begin download and install python from Here

 Step 1:

open notepad and type


import webbrowser

In python the "import" statement is used to add a module to your project. In this case we want to add the webbrowser module.

Step 2:

webbrowser.open('http://SITE HERE!.com')

This is calling the open function on your default web browser. You pass it an url in the form of a string.

Possible usages:

You can add as many websites as you want like show below


webbrowser.open('http://facebook.com')
webbrowser.open('http://google.com')
url = "http://gmail.com";
webbrowser.open(url)

The complete code will look something like below
import webbrowser
webbrowser.open('http://gmail.com')
webbrowser.open('http://google.com')
webbrowser.open('http://yahoo.com')
webbrowser.open('http://facebook.com')

Step 3

Save the file as visus.py



  Keep Visiting
Name

android facebook free-zone Freebies hacking How-to programming scripts video whatsapp
false
ltr
item
Mr Tricks: Opening Number Of Websites Using Python
Opening Number Of Websites Using Python
http://3.bp.blogspot.com/-u1QJcTqGMu4/Uu9BfRT06vI/AAAAAAAABS8/_uSF4xEpo-0/s640/images.jpeg
http://3.bp.blogspot.com/-u1QJcTqGMu4/Uu9BfRT06vI/AAAAAAAABS8/_uSF4xEpo-0/s72-c/images.jpeg
Mr Tricks
http://mr-tricks.blogspot.com/2015/01/opening-number-of-websites-using-python.html
http://mr-tricks.blogspot.com/
http://mr-tricks.blogspot.com/
http://mr-tricks.blogspot.com/2015/01/opening-number-of-websites-using-python.html
true
248440411475805434
UTF-8
Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy