Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import ipaddress
- def ipEntered():
- while True:
- try:
- val = input("Please enter the ip address of the server you wish to connect with:")
- return ipaddress.ip_address(val)
- except ValueError:
- print("Not a valid IP address")
Add Comment
Please, Sign In to add comment