summaryrefslogtreecommitdiffstats
path: root/Demo/threads/telnet.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-12-17 14:45:06 (GMT)
committerGuido van Rossum <guido@python.org>1993-12-17 14:45:06 (GMT)
commitf82fef0f594a290af96007f28c286ef6f7e4f180 (patch)
treee06721b9777ef1a2492b19f285b58f7053daa436 /Demo/threads/telnet.py
parentd55f4d1a7665aaeeba85c64671350fe408bc5bb2 (diff)
downloadcpython-f82fef0f594a290af96007f28c286ef6f7e4f180.zip
cpython-f82fef0f594a290af96007f28c286ef6f7e4f180.tar.gz
cpython-f82fef0f594a290af96007f28c286ef6f7e4f180.tar.bz2
*** empty log message ***
Diffstat (limited to 'Demo/threads/telnet.py')
-rw-r--r--Demo/threads/telnet.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Demo/threads/telnet.py b/Demo/threads/telnet.py
index e5101eb..5d4ae76 100644
--- a/Demo/threads/telnet.py
+++ b/Demo/threads/telnet.py
@@ -28,6 +28,9 @@ WONT = chr(252)
WILL = chr(251)
def main():
+ if len(sys.argv) != 2:
+ sys.stderr.write('usage: telnet hostname\n')
+ sys.exit(2)
host = sys.argv[1]
try:
hostaddr = gethostbyname(host)
@@ -74,7 +77,7 @@ def parent(s):
for c in data:
if opt:
print ord(c)
- print '(replying: ' + `opt+c` + ')'
+## print '(replying: ' + `opt+c` + ')'
s.send(opt + c)
opt = ''
elif iac: