diff options
author | Guido van Rossum <guido@python.org> | 1992-05-19 13:51:20 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-05-19 13:51:20 (GMT) |
commit | f628a985ffce3a027d76d7b271dc0c3d81892d30 (patch) | |
tree | 798e34fb85d0adee96a40e1947b516bf4c348ad9 /Demo/sockets/telnet.py | |
parent | 61cfd96003aca03518e848a0fc5490787bf066ff (diff) | |
download | cpython-f628a985ffce3a027d76d7b271dc0c3d81892d30.zip cpython-f628a985ffce3a027d76d7b271dc0c3d81892d30.tar.gz cpython-f628a985ffce3a027d76d7b271dc0c3d81892d30.tar.bz2 |
New == syntax
Diffstat (limited to 'Demo/sockets/telnet.py')
-rwxr-xr-x | Demo/sockets/telnet.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Demo/sockets/telnet.py b/Demo/sockets/telnet.py index 60f832a..20d14c3 100755 --- a/Demo/sockets/telnet.py +++ b/Demo/sockets/telnet.py @@ -58,7 +58,7 @@ def main(): # pid = posix.fork() # - if pid = 0: + if pid == 0: # child -- read stdin, write socket while 1: line = sys.stdin.readline() @@ -82,19 +82,19 @@ def main(): opt = '' elif iac: iac = 0 - if c = IAC: + if c == IAC: cleandata = cleandata + c elif c in (DO, DONT): - if c = DO: print '(DO)', + if c == DO: print '(DO)', else: print '(DONT)', opt = IAC + WONT elif c in (WILL, WONT): - if c = WILL: print '(WILL)', + if c == WILL: print '(WILL)', else: print '(WONT)', opt = IAC + DONT else: print '(command)', ord(c) - elif c = IAC: + elif c == IAC: iac = 1 print '(IAC)', else: |