Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c0b965b8
Commit
c0b965b8
authored
Mar 11, 1998
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the docstring
parent
d2c210df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
Tools/world/world
Tools/world/world
+17
-6
No files found.
Tools/world/world
View file @
c0b965b8
...
...
@@ -2,17 +2,18 @@
"""Print mappings between country names and DNS country codes.
This script will take a
n Internet addres
s and print out where in the
world th
at message originated from, based on the top-level domain code
found in the address. Addresses can be in any of the following forms:
This script will take a
list of Internet addresse
s and print out where in the
world th
ose addresses originate from, based on the top-level domain country
code
found in the address. Addresses can be in any of the following forms:
xx -- just the country code or top-level domain identifier
host.domain.xx -- any Internet host or network name
somebody@where.xx -- an Internet email address
If the country code is not recognizable, it will attempt a reverse lookup,
searching for the country name and printing a list of matching country codes.
You can force reverse mappings with the `-r' flag (see below).
If no match is found, the address is interpreted as a regular expression [*]
and a reverse lookup is attempted. This script will search the country names
and printing a list of matching entries. You can force reverse mappings with
the `-r' flag (see below).
For example:
...
...
@@ -21,8 +22,17 @@ For example:
us originated from United States
% 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,
in coordination with the ISO 3166 Maintenance Agency at DIN Berlin. The
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.
Usage: %s [-d] [-p|-P file] [-h] addr [addr ...]
--dump
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment