Guest User

Untitled

a guest
Jan 22nd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. import ipaddress
  2. def ipEntered():
  3. while True:
  4. try:
  5. val = input("Please enter the ip address of the server you wish to connect with:")
  6. return ipaddress.ip_address(val)
  7. except ValueError:
  8. print("Not a valid IP address")
Add Comment
Please, Sign In to add comment