summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xDemo/sockets/finger.py2
-rwxr-xr-xDemo/sockets/telnet.py10
-rwxr-xr-xDemo/sockets/throughput.py4
-rwxr-xr-xDemo/sockets/udpecho.py4
4 files changed, 10 insertions, 10 deletions
diff --git a/Demo/sockets/finger.py b/Demo/sockets/finger.py
index 8aa0535..01c0b6c 100755
--- a/Demo/sockets/finger.py
+++ b/Demo/sockets/finger.py
@@ -37,7 +37,7 @@ def finger(host, args):
def main():
options = ''
i = 1
- while i < len(sys.argv) and sys.argv[i][:1] = '-':
+ while i < len(sys.argv) and sys.argv[i][:1] == '-':
options = options + sys.argv[i] + ' '
i = i+1
args = sys.argv[i:]
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:
diff --git a/Demo/sockets/throughput.py b/Demo/sockets/throughput.py
index 411af9f..6ffcaa8 100755
--- a/Demo/sockets/throughput.py
+++ b/Demo/sockets/throughput.py
@@ -23,9 +23,9 @@ BUFSIZE = 1024
def main():
if len(sys.argv) < 2:
usage()
- if sys.argv[1] = '-s':
+ if sys.argv[1] == '-s':
server()
- elif sys.argv[1] = '-c':
+ elif sys.argv[1] == '-c':
client()
else:
usage()
diff --git a/Demo/sockets/udpecho.py b/Demo/sockets/udpecho.py
index 53dff64..0e1efc7 100755
--- a/Demo/sockets/udpecho.py
+++ b/Demo/sockets/udpecho.py
@@ -14,9 +14,9 @@ BUFSIZE = 1024
def main():
if len(sys.argv) < 2:
usage()
- if sys.argv[1] = '-s':
+ if sys.argv[1] == '-s':
server()
- elif sys.argv[1] = '-c':
+ elif sys.argv[1] == '-c':
client()
else:
usage()