Simple ping program in python