Lines Matching refs:sys
16 import sys, os, time
31 if len(sys.argv) < 2:
32 sys.stderr.write('usage: telnet hostname [port]\n')
33 sys.exit(2)
34 host = sys.argv[1]
38 sys.stderr.write(sys.argv[1] + ': bad host name\n')
39 sys.exit(2)
41 if len(sys.argv) > 2:
42 servname = sys.argv[2]
52 sys.stderr.write(servname + ': bad tcp service name\n')
53 sys.exit(2)
60 sys.stderr.write('connect failed: %r\n' % (msg,))
61 sys.exit(1)
74 sys.stderr.write( '(Closed by remote host)\n')
75 sys.exit(1)
102 sys.stdout.write(cleandata)
103 sys.stdout.flush()
109 line = sys.stdin.readline()