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
2a6e68f6
Commit
2a6e68f6
authored
Nov 19, 1996
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Output original address
parent
de0e8f76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Tools/world/world
Tools/world/world
+4
-4
No files found.
Tools/world/world
View file @
2a6e68f6
#! /
usr/
bin/env python
#! /bin/env python
"""Print the long name of an Internet domain.
...
...
@@ -43,11 +43,11 @@ def resolve(rawaddr):
return
addr
=
parts
[
-
1
]
if
nameorg
.
has_key
(
addr
):
print
addr
,
'is from a USA'
,
nameorg
[
addr
],
'organization'
print
raw
addr
,
'is from a USA'
,
nameorg
[
addr
],
'organization'
elif
country
.
has_key
(
addr
):
print
addr
,
'originated from'
,
country
[
addr
]
print
raw
addr
,
'originated from'
,
country
[
addr
]
else
:
print
'Where in the world is %s?'
%
addr
print
'Where in the world is %s?'
%
raw
addr
...
...
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