This is a script I wrote in python to check the external IP address of my server every five minutes to see if it has changed. If so, it uses the api of my dns provider to change my DNS A record. It's more or less a dyndns alternative.