'Set the wordpress API key for all transactions.
If you don\'t specify an explicit API ``key`` and ``blog_url`` it will
attempt to load them from a file called ``apikey.txt`` in the current
directory.
This method is *usually* called automatically when you create a new
``Akismet`` instance.'

def setAPIKey(self, key=None, blog_url=None):

    if ((key is None) and isfile('apikey.txt')):
        the_file = [l.strip() for l in open('apikey.txt').readlines() if (l.strip() and (not l.strip().startswith('#')))]
        try:
            self.key = the_file[0]
            self.blog_url = the_file[1]
        except IndexError:
            raise APIKeyError("Your    'apikey.txt'    is    invalid.")
    else:
        self.key = key
        self.blog_url = blog_url
