Check for IP before running python scripts