W

world

Where in the world is...? Prints the country name for ccTLDs, and also knows about other popular ISO 3166 top-level domains. It can also search for and print the reverse mappings.

Name Last Update
worldlib Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
LICENSE.txt Loading commit data...
MANIFEST.in Loading commit data...
README.rst Loading commit data...
coverage.ini Loading commit data...
scraper.py Loading commit data...
setup.cfg Loading commit data...
setup.py Loading commit data...
setup_helpers.py Loading commit data...
template.py Loading commit data...
tox.ini Loading commit data...
unittest.cfg Loading commit data...
world Loading commit data...

world -- Print mappings between country names and DNS country codes

This script takes a list of Internet top-level domain names and prints out where in the world those domains originate from. For example:

$ world tz us
tz originates from Tanzania, United Republic of
us originates from United States of America (the)

Reverse look ups are also supported:

$ world -r united
Matches for "united":
  ae: United Arab Emirates (the)
  gb: United Kingdom of Great Britain and Northern Ireland (the)
  tz: Tanzania, United Republic of
  uk: United Kingdom (common practice)
  um: United States Minor Outlying Islands (the)
  us: United States of America (the)

Only two-letter country codes are supported, since these are the only ones that were freely available from the ISO 3166 standard. However, as of 2015-01-09, even these are no longer freely available in a machine readable format.

This script also knows about non-geographic, generic, USA-centric, historical, common usage, and reserved top-level domains.

Project details

Author

world and worldlib is Copyright (C) 2013-2016 Barry Warsaw <barry@python.org>

Licensed under the terms of the GNU General Public License, version 3 or later. See the LICENSE.txt file for details.