diff options
author | Guido van Rossum <guido@python.org> | 1993-12-17 14:45:06 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-12-17 14:45:06 +0000 |
commit | dc27ff2a328822460e8052c3494449a5479900d5 (patch) | |
tree | 84343161d08550baba8332332401b6981565eab1 /Demo/threads | |
parent | 6ad9da50e0d89f4899678a5bece937afe471876e (diff) | |
download | cpython-dc27ff2a328822460e8052c3494449a5479900d5.tar.gz |
*** empty log message ***
Diffstat (limited to 'Demo/threads')
-rw-r--r-- | Demo/threads/README | 5 | ||||
-rw-r--r-- | Demo/threads/telnet.py | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/Demo/threads/README b/Demo/threads/README index 9c6d30ac26..01566fc98d 100644 --- a/Demo/threads/README +++ b/Demo/threads/README @@ -1,5 +1,8 @@ This directory contains some demonstrations of the thread module. -They are mostly "proof of concept" type applications: +This module is only (optionally) available for the SGI, for now. +These are mostly "proof of concept" type applications: + +find.py Parallelized "find(1)". telnet.py Version of ../sockets/telnet.py using threads. wpi.py Version of ../scripts/pi.py using threads and stdwin. diff --git a/Demo/threads/telnet.py b/Demo/threads/telnet.py index e5101eb497..5d4ae76cad 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: |