Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # Test connectivity
- # Haunui Collin "aDn"
- title = '----------------------------------------'
- print title
- print 'Python Connectivity'
- print title
- print 'You want test if you are connected to internet ?'
- reponse = raw_input(" Yes or Not (Y/N): ")
- if reponse == "Y":
- msg = "Please wait, in work..."
- print msg
- print title
- else:
- exit()
- try:
- import urllib
- maPage = urllib.urlopen('http://google.fr')
- print 'Your are connected !'
- except IOError:
- print 'You are not connected !'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement