I know about gethostbyaddr in Python and that is somewhat useful for me.  I would like to get even more info about an ip address like one can find at various websites such as who hosts that ip address, the country of origin, ..., etc.  I need to accomplish this programmatically.
Are there any built in commands for Python, or would I need access to some database which contains this type of information, or are there any Python APIs?  Python is not my native language so I am not as familiar with how one would approach such a problem in Python.
Ok, here is my answer.  I am going to work on cleaning up for public consumption a Python 3.x version of pywhois that I have on my machine and hopefully in the next week I will submit my code to the subversion repository.  From the IP addresses I am using, I have about a 78% success rate for retrieving info first by applying gethostbyaddr to the IP address as phihag suggested and then putting that through pywhois.  I will let the reader decide for themselves whether that rate is high enough for their particular application.
In Python, Getting More Info About An IP Address