summaryrefslogtreecommitdiffstats
path: root/Demo/sgi/al/intercom.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-03-30 13:30:03 (GMT)
committerGuido van Rossum <guido@python.org>1992-03-30 13:30:03 (GMT)
commit14f43cf5dc0dffca22e4cbd3989928cc39e43014 (patch)
treed2dd8cb5bb1e9e9b245d69cbcd89cfe1b682154e /Demo/sgi/al/intercom.py
parent453bd408bdd9287bb020e6ec5411983c8d176c89 (diff)
downloadcpython-14f43cf5dc0dffca22e4cbd3989928cc39e43014.zip
cpython-14f43cf5dc0dffca22e4cbd3989928cc39e43014.tar.gz
cpython-14f43cf5dc0dffca22e4cbd3989928cc39e43014.tar.bz2
new '==' syntax
Diffstat (limited to 'Demo/sgi/al/intercom.py')
-rwxr-xr-xDemo/sgi/al/intercom.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Demo/sgi/al/intercom.py b/Demo/sgi/al/intercom.py
index 2babb93..0799efa 100755
--- a/Demo/sgi/al/intercom.py
+++ b/Demo/sgi/al/intercom.py
@@ -28,8 +28,8 @@ def main():
remote = 0
opts, args = getopt.getopt(sys.argv[1:], 'rd')
for opt, arg in opts:
- if opt = '-r': remote = 1
- elif opt = '-d': debug.append(opt)
+ if opt == '-r': remote = 1
+ elif opt == '-d': debug.append(opt)
if len(args) <> 1:
msg = 'usage: intercom [-d] [-r] hostname'
msg = msg + ' (-r is for internal use only!)\n'
@@ -56,10 +56,10 @@ def client(hostname):
line = pipe.readline()
if not line: break
sys.stdout.write('remote: ' + line)
- if line = 'NAK\n':
+ if line == 'NAK\n':
nak = 1
break
- elif line = 'ACK\n':
+ elif line == 'ACK\n':
ack = 1
break
if nak:
@@ -135,7 +135,7 @@ def ioloop(s, otheraddr):
for i in range(0, len(params), 2):
if params[i] in (AL.INPUT_RATE, AL.OUTPUT_RATE):
params[i+1] = AL.RATE_16000
- elif params[i] = AL.INPUT_SOURCE:
+ elif params[i] == AL.INPUT_SOURCE:
params[i+1] = AL.INPUT_MIC
try:
al.setparams(dev, params)
@@ -166,7 +166,7 @@ def ioloop1(s, otheraddr):
spkr = al.openport('spkr', 'w', config)
while 1:
data = s.recv(BUFSIZE)
- if len(data) = 0:
+ if len(data) == 0:
# EOF packet
log('parent got empty packet; killing child')
posix.kill(pid, 15)