I am writing a simple client and server and want to introduce some simple bounds checking to insure the IP address entered by a user is in the correct format i.e.(int.int.int.int), does anybody have any suggestions as to hwo this can be done at the moment my code just accepts the value and will throw an OS error if its invalid. But I want to stop a user being able to enter anything in here.
def ipEntered():
global ipEntered
ipEntered = input("Please enter the ip address of the server you wish to connect with:")
Thanks