Example

The whois module provides a sub-module to query country longitude and latitude:

>>> import whois
>>> whois.geomap.getLongLat('SPAIN')
(40.0, -4.0)

Drawing the world map of some data depending on countries is as easy:

>>> from pylab import show
>>> whois.geomap.world({'CANADA': 48, 'FRANCE': 4, 'INDIA': 570})
>>> show()

That's all! ;-)

Note: country names are matched in uppercase only. They must match the whois country names.

Download

The whois module requires Matplotlib and the Python Imaging Library (PIL).

The source archive provides the standard Python installer (python setup.py install) as the development archive provides additional files to build documentation, archives and Windows installer. You can check the file integrity with the following MD5 sums:

590635a889c44223f850e2a8e42f5141  whois-0.2.0.tar.gz
ec3575b6588a1b21e0bcf43609ae2240  whois-0.2.0.win32.exe
ad9d8f6cb24915828729c10e48c391f9  whois-dev-20070331.tar.bz2

Documentation

Installation

Uncompress the archive and install the Python module as root:

  1. tar xzf whois-0.2.0.tar.gz
  2. cd whois-0.2.0/
  3. python setup.py install

You're done! See Whois python service 0.1.0 (en) for further information on installing and the basic whois use.