Can anyone explain a part of a telnet client code to me..

2007-02-10 Thread Jia Lu
Hello I have a program that can telnet to a host. But I cannot understand from [for c in data] part, can anyone explain it to me? Thank you very much. [CODE] import sys, posix, time from socket import * BUFSIZE = 1024 # Telnet protocol characters IAC = chr(255) # Interpret as command

Re: Can anyone explain a part of a telnet client code to me..

2007-02-10 Thread Gabriel Genellina
En Sun, 11 Feb 2007 00:48:57 -0300, Jia Lu [EMAIL PROTECTED] escribió: I have a program that can telnet to a host. But I cannot understand from [for c in data] part, can anyone explain it to me? data is the received string. The for statement is used to iterate over a sequence; a string is