mirror of https://github.com/python/cpython.git
Updated the docstring
This commit is contained in:
parent
d2c210df62
commit
c0b965b81b
|
@ -2,17 +2,18 @@
|
||||||
|
|
||||||
"""Print mappings between country names and DNS country codes.
|
"""Print mappings between country names and DNS country codes.
|
||||||
|
|
||||||
This script will take an Internet address and print out where in the
|
This script will take a list of Internet addresses and print out where in the
|
||||||
world that message originated from, based on the top-level domain code
|
world those addresses originate from, based on the top-level domain country
|
||||||
found in the address. Addresses can be in any of the following forms:
|
code found in the address. Addresses can be in any of the following forms:
|
||||||
|
|
||||||
xx -- just the country code or top-level domain identifier
|
xx -- just the country code or top-level domain identifier
|
||||||
host.domain.xx -- any Internet host or network name
|
host.domain.xx -- any Internet host or network name
|
||||||
somebody@where.xx -- an Internet email address
|
somebody@where.xx -- an Internet email address
|
||||||
|
|
||||||
If the country code is not recognizable, it will attempt a reverse lookup,
|
If no match is found, the address is interpreted as a regular expression [*]
|
||||||
searching for the country name and printing a list of matching country codes.
|
and a reverse lookup is attempted. This script will search the country names
|
||||||
You can force reverse mappings with the `-r' flag (see below).
|
and printing a list of matching entries. You can force reverse mappings with
|
||||||
|
the `-r' flag (see below).
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
|
@ -21,8 +22,17 @@ For example:
|
||||||
us originated from United States
|
us originated from United States
|
||||||
|
|
||||||
% world united
|
% world united
|
||||||
|
united matches 5 countries:
|
||||||
|
ae: United Arab Emirates
|
||||||
|
um: United States Minor Outlying Islands
|
||||||
|
us: United States
|
||||||
|
tz: Tanzania, United Republic of
|
||||||
|
gb: United Kingdom
|
||||||
|
|
||||||
|
|
||||||
|
[*] Note that regular expressions must conform to Python 1.5's re.py module
|
||||||
|
syntax. The comparison is done with the search() method.
|
||||||
|
|
||||||
Country codes are maintained by the RIPE Network Coordination Centre,
|
Country codes are maintained by the RIPE Network Coordination Centre,
|
||||||
in coordination with the ISO 3166 Maintenance Agency at DIN Berlin. The
|
in coordination with the ISO 3166 Maintenance Agency at DIN Berlin. The
|
||||||
authoritative source of counry code mappings is:
|
authoritative source of counry code mappings is:
|
||||||
|
@ -35,6 +45,7 @@ The latest known change to this information was:
|
||||||
|
|
||||||
This script also knows about non-geographic top-level domains.
|
This script also knows about non-geographic top-level domains.
|
||||||
|
|
||||||
|
|
||||||
Usage: %s [-d] [-p|-P file] [-h] addr [addr ...]
|
Usage: %s [-d] [-p|-P file] [-h] addr [addr ...]
|
||||||
|
|
||||||
--dump
|
--dump
|
||||||
|
|
Loading…
Reference in New Issue