Back to index

python3.2  3.2.2
Classes | Functions | Variables
telnetlib Namespace Reference

Classes

class  Telnet

Functions

def test

Variables

list __all__ = ["Telnet"]
int DEBUGLEVEL = 0
int TELNET_PORT = 23
tuple IAC = bytes([255])
tuple DONT = bytes([254])
tuple DO = bytes([253])
tuple WONT = bytes([252])
tuple WILL = bytes([251])
tuple theNULL = bytes([0])
tuple SE = bytes([240])
tuple NOP = bytes([241])
tuple DM = bytes([242])
tuple BRK = bytes([243])
tuple IP = bytes([244])
tuple AO = bytes([245])
tuple AYT = bytes([246])
tuple EC = bytes([247])
tuple EL = bytes([248])
tuple GA = bytes([249])
tuple SB = bytes([250])
tuple BINARY = bytes([0])
tuple ECHO = bytes([1])
tuple RCP = bytes([2])
tuple SGA = bytes([3])
tuple NAMS = bytes([4])
tuple STATUS = bytes([5])
tuple TM = bytes([6])
tuple RCTE = bytes([7])
tuple NAOL = bytes([8])
tuple NAOP = bytes([9])
tuple NAOCRD = bytes([10])
tuple NAOHTS = bytes([11])
tuple NAOHTD = bytes([12])
tuple NAOFFD = bytes([13])
tuple NAOVTS = bytes([14])
tuple NAOVTD = bytes([15])
tuple NAOLFD = bytes([16])
tuple XASCII = bytes([17])
tuple LOGOUT = bytes([18])
tuple BM = bytes([19])
tuple DET = bytes([20])
tuple SUPDUP = bytes([21])
tuple SUPDUPOUTPUT = bytes([22])
tuple SNDLOC = bytes([23])
tuple TTYPE = bytes([24])
tuple EOR = bytes([25])
tuple TUID = bytes([26])
tuple OUTMRK = bytes([27])
tuple TTYLOC = bytes([28])
tuple VT3270REGIME = bytes([29])
tuple X3PAD = bytes([30])
tuple NAWS = bytes([31])
tuple TSPEED = bytes([32])
tuple LFLOW = bytes([33])
tuple LINEMODE = bytes([34])
tuple XDISPLOC = bytes([35])
tuple OLD_ENVIRON = bytes([36])
tuple AUTHENTICATION = bytes([37])
tuple ENCRYPT = bytes([38])
tuple NEW_ENVIRON = bytes([39])
tuple TN3270E = bytes([40])
tuple XAUTH = bytes([41])
tuple CHARSET = bytes([42])
tuple RSP = bytes([43])
tuple COM_PORT_OPTION = bytes([44])
tuple SUPPRESS_LOCAL_ECHO = bytes([45])
tuple TLS = bytes([46])
tuple KERMIT = bytes([47])
tuple SEND_URL = bytes([48])
tuple FORWARD_X = bytes([49])
tuple PRAGMA_LOGON = bytes([138])
tuple SSPI_LOGON = bytes([139])
tuple PRAGMA_HEARTBEAT = bytes([140])
tuple EXOPL = bytes([255])
tuple NOOPT = bytes([0])

Function Documentation

def telnetlib.test ( )
Test program for telnetlib.

Usage: python telnetlib.py [-d] ... [host [port]]

Default host is localhost; default port is 23.

Definition at line 628 of file telnetlib.py.

00628 
00629 def test():
00630     """Test program for telnetlib.
00631 
00632     Usage: python telnetlib.py [-d] ... [host [port]]
00633 
00634     Default host is localhost; default port is 23.
00635 
00636     """
00637     debuglevel = 0
00638     while sys.argv[1:] and sys.argv[1] == '-d':
00639         debuglevel = debuglevel+1
00640         del sys.argv[1]
00641     host = 'localhost'
00642     if sys.argv[1:]:
00643         host = sys.argv[1]
00644     port = 0
00645     if sys.argv[2:]:
00646         portstr = sys.argv[2]
00647         try:
00648             port = int(portstr)
00649         except ValueError:
00650             port = socket.getservbyname(portstr, 'tcp')
00651     tn = Telnet()
00652     tn.set_debuglevel(debuglevel)
00653     tn.open(host, port, timeout=0.5)
00654     tn.interact()
00655     tn.close()


Variable Documentation

list telnetlib.__all__ = ["Telnet"]

Definition at line 41 of file telnetlib.py.

tuple telnetlib.AO = bytes([245])

Definition at line 62 of file telnetlib.py.

Definition at line 109 of file telnetlib.py.

tuple telnetlib.AYT = bytes([246])

Definition at line 63 of file telnetlib.py.

tuple telnetlib.BINARY = bytes([0])

Definition at line 72 of file telnetlib.py.

tuple telnetlib.BM = bytes([19])

Definition at line 91 of file telnetlib.py.

tuple telnetlib.BRK = bytes([243])

Definition at line 60 of file telnetlib.py.

tuple telnetlib.CHARSET = bytes([42])

Definition at line 118 of file telnetlib.py.

Definition at line 120 of file telnetlib.py.

Definition at line 44 of file telnetlib.py.

tuple telnetlib.DET = bytes([20])

Definition at line 92 of file telnetlib.py.

tuple telnetlib.DM = bytes([242])

Definition at line 59 of file telnetlib.py.

tuple telnetlib.DO = bytes([253])

Definition at line 52 of file telnetlib.py.

tuple telnetlib.DONT = bytes([254])

Definition at line 51 of file telnetlib.py.

tuple telnetlib.EC = bytes([247])

Definition at line 64 of file telnetlib.py.

tuple telnetlib.ECHO = bytes([1])

Definition at line 73 of file telnetlib.py.

tuple telnetlib.EL = bytes([248])

Definition at line 65 of file telnetlib.py.

tuple telnetlib.ENCRYPT = bytes([38])

Definition at line 110 of file telnetlib.py.

tuple telnetlib.EOR = bytes([25])

Definition at line 97 of file telnetlib.py.

tuple telnetlib.EXOPL = bytes([255])

Definition at line 129 of file telnetlib.py.

tuple telnetlib.FORWARD_X = bytes([49])

Definition at line 125 of file telnetlib.py.

tuple telnetlib.GA = bytes([249])

Definition at line 66 of file telnetlib.py.

tuple telnetlib.IAC = bytes([255])

Definition at line 50 of file telnetlib.py.

tuple telnetlib.IP = bytes([244])

Definition at line 61 of file telnetlib.py.

tuple telnetlib.KERMIT = bytes([47])

Definition at line 123 of file telnetlib.py.

tuple telnetlib.LFLOW = bytes([33])

Definition at line 105 of file telnetlib.py.

tuple telnetlib.LINEMODE = bytes([34])

Definition at line 106 of file telnetlib.py.

tuple telnetlib.LOGOUT = bytes([18])

Definition at line 90 of file telnetlib.py.

tuple telnetlib.NAMS = bytes([4])

Definition at line 76 of file telnetlib.py.

tuple telnetlib.NAOCRD = bytes([10])

Definition at line 82 of file telnetlib.py.

tuple telnetlib.NAOFFD = bytes([13])

Definition at line 85 of file telnetlib.py.

tuple telnetlib.NAOHTD = bytes([12])

Definition at line 84 of file telnetlib.py.

tuple telnetlib.NAOHTS = bytes([11])

Definition at line 83 of file telnetlib.py.

tuple telnetlib.NAOL = bytes([8])

Definition at line 80 of file telnetlib.py.

tuple telnetlib.NAOLFD = bytes([16])

Definition at line 88 of file telnetlib.py.

tuple telnetlib.NAOP = bytes([9])

Definition at line 81 of file telnetlib.py.

tuple telnetlib.NAOVTD = bytes([15])

Definition at line 87 of file telnetlib.py.

tuple telnetlib.NAOVTS = bytes([14])

Definition at line 86 of file telnetlib.py.

tuple telnetlib.NAWS = bytes([31])

Definition at line 103 of file telnetlib.py.

Definition at line 111 of file telnetlib.py.

tuple telnetlib.NOOPT = bytes([0])

Definition at line 130 of file telnetlib.py.

tuple telnetlib.NOP = bytes([241])

Definition at line 58 of file telnetlib.py.

Definition at line 108 of file telnetlib.py.

tuple telnetlib.OUTMRK = bytes([27])

Definition at line 99 of file telnetlib.py.

Definition at line 128 of file telnetlib.py.

tuple telnetlib.PRAGMA_LOGON = bytes([138])

Definition at line 126 of file telnetlib.py.

tuple telnetlib.RCP = bytes([2])

Definition at line 74 of file telnetlib.py.

tuple telnetlib.RCTE = bytes([7])

Definition at line 79 of file telnetlib.py.

tuple telnetlib.RSP = bytes([43])

Definition at line 119 of file telnetlib.py.

tuple telnetlib.SB = bytes([250])

Definition at line 67 of file telnetlib.py.

tuple telnetlib.SE = bytes([240])

Definition at line 57 of file telnetlib.py.

tuple telnetlib.SEND_URL = bytes([48])

Definition at line 124 of file telnetlib.py.

tuple telnetlib.SGA = bytes([3])

Definition at line 75 of file telnetlib.py.

tuple telnetlib.SNDLOC = bytes([23])

Definition at line 95 of file telnetlib.py.

tuple telnetlib.SSPI_LOGON = bytes([139])

Definition at line 127 of file telnetlib.py.

tuple telnetlib.STATUS = bytes([5])

Definition at line 77 of file telnetlib.py.

tuple telnetlib.SUPDUP = bytes([21])

Definition at line 93 of file telnetlib.py.

Definition at line 94 of file telnetlib.py.

Definition at line 121 of file telnetlib.py.

Definition at line 47 of file telnetlib.py.

tuple telnetlib.theNULL = bytes([0])

Definition at line 55 of file telnetlib.py.

tuple telnetlib.TLS = bytes([46])

Definition at line 122 of file telnetlib.py.

tuple telnetlib.TM = bytes([6])

Definition at line 78 of file telnetlib.py.

tuple telnetlib.TN3270E = bytes([40])

Definition at line 116 of file telnetlib.py.

tuple telnetlib.TSPEED = bytes([32])

Definition at line 104 of file telnetlib.py.

tuple telnetlib.TTYLOC = bytes([28])

Definition at line 100 of file telnetlib.py.

tuple telnetlib.TTYPE = bytes([24])

Definition at line 96 of file telnetlib.py.

tuple telnetlib.TUID = bytes([26])

Definition at line 98 of file telnetlib.py.

Definition at line 101 of file telnetlib.py.

tuple telnetlib.WILL = bytes([251])

Definition at line 54 of file telnetlib.py.

tuple telnetlib.WONT = bytes([252])

Definition at line 53 of file telnetlib.py.

tuple telnetlib.X3PAD = bytes([30])

Definition at line 102 of file telnetlib.py.

tuple telnetlib.XASCII = bytes([17])

Definition at line 89 of file telnetlib.py.

tuple telnetlib.XAUTH = bytes([41])

Definition at line 117 of file telnetlib.py.

tuple telnetlib.XDISPLOC = bytes([35])

Definition at line 107 of file telnetlib.py.