mirror of
https://github.com/python/cpython.git
synced 2025-10-22 22:53:06 +00:00
*** empty log message ***
This commit is contained in:
parent
d55f4d1a76
commit
f82fef0f59
2 changed files with 8 additions and 2 deletions
|
@ -1,5 +1,8 @@
|
||||||
This directory contains some demonstrations of the thread module.
|
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.
|
telnet.py Version of ../sockets/telnet.py using threads.
|
||||||
wpi.py Version of ../scripts/pi.py using threads and stdwin.
|
wpi.py Version of ../scripts/pi.py using threads and stdwin.
|
||||||
|
|
|
@ -28,6 +28,9 @@ WONT = chr(252)
|
||||||
WILL = chr(251)
|
WILL = chr(251)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
if len(sys.argv) != 2:
|
||||||
|
sys.stderr.write('usage: telnet hostname\n')
|
||||||
|
sys.exit(2)
|
||||||
host = sys.argv[1]
|
host = sys.argv[1]
|
||||||
try:
|
try:
|
||||||
hostaddr = gethostbyname(host)
|
hostaddr = gethostbyname(host)
|
||||||
|
@ -74,7 +77,7 @@ def parent(s):
|
||||||
for c in data:
|
for c in data:
|
||||||
if opt:
|
if opt:
|
||||||
print ord(c)
|
print ord(c)
|
||||||
print '(replying: ' + `opt+c` + ')'
|
## print '(replying: ' + `opt+c` + ')'
|
||||||
s.send(opt + c)
|
s.send(opt + c)
|
||||||
opt = ''
|
opt = ''
|
||||||
elif iac:
|
elif iac:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue