Skip to content

Commit 14f43cf

Browse files
committed
new '==' syntax
1 parent 453bd40 commit 14f43cf

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

Demo/sgi/al/alwatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
for i in range(0, len(params), 2):
2525
if params[i+1] <> old[i+1]:
2626
name = parameter_name[params[i]]
27-
if params[i] = AL.INPUT_SOURCE:
27+
if params[i] == AL.INPUT_SOURCE:
2828
if 0 <= old[i+1] < len(source_name):
2929
oldval = source_name[old[i+1]]
3030
else:

Demo/sgi/al/intercom.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def main():
2828
remote = 0
2929
opts, args = getopt.getopt(sys.argv[1:], 'rd')
3030
for opt, arg in opts:
31-
if opt = '-r': remote = 1
32-
elif opt = '-d': debug.append(opt)
31+
if opt == '-r': remote = 1
32+
elif opt == '-d': debug.append(opt)
3333
if len(args) <> 1:
3434
msg = 'usage: intercom [-d] [-r] hostname'
3535
msg = msg + ' (-r is for internal use only!)\n'
@@ -56,10 +56,10 @@ def client(hostname):
5656
line = pipe.readline()
5757
if not line: break
5858
sys.stdout.write('remote: ' + line)
59-
if line = 'NAK\n':
59+
if line == 'NAK\n':
6060
nak = 1
6161
break
62-
elif line = 'ACK\n':
62+
elif line == 'ACK\n':
6363
ack = 1
6464
break
6565
if nak:
@@ -135,7 +135,7 @@ def ioloop(s, otheraddr):
135135
for i in range(0, len(params), 2):
136136
if params[i] in (AL.INPUT_RATE, AL.OUTPUT_RATE):
137137
params[i+1] = AL.RATE_16000
138-
elif params[i] = AL.INPUT_SOURCE:
138+
elif params[i] == AL.INPUT_SOURCE:
139139
params[i+1] = AL.INPUT_MIC
140140
try:
141141
al.setparams(dev, params)
@@ -166,7 +166,7 @@ def ioloop1(s, otheraddr):
166166
spkr = al.openport('spkr', 'w', config)
167167
while 1:
168168
data = s.recv(BUFSIZE)
169-
if len(data) = 0:
169+
if len(data) == 0:
170170
# EOF packet
171171
log('parent got empty packet; killing child')
172172
posix.kill(pid, 15)

Demo/sgi/al/playaiff.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ def main():
2222
except EOFError:
2323
break
2424
if v: print 'header:', `type`, size
25-
if type = 'COMM':
25+
if type == 'COMM':
2626
nchannels, nsampframes, sampwidth, samprate = \
2727
aiff.read_comm_chunk(f)
2828
if v: print nchannels, nsampframes, sampwidth, samprate
29-
elif type = 'SSND':
29+
elif type == 'SSND':
3030
offset, blocksize = aiff.read_ssnd_chunk(f)
3131
if v: print offset, blocksize
3232
data = f.read(size-8)

Demo/sgi/al/playold.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ def main():
1919
#
2020
magic = f.read(4)
2121
extra = ''
22-
if magic = '0008':
22+
if magic == '0008':
2323
rate = 8000
24-
elif magic = '0016':
24+
elif magic == '0016':
2525
rate = 16000
26-
elif magic = '0032':
26+
elif magic == '0032':
2727
rate = 32000
2828
else:
2929
sys.stderr.write('no magic header; assuming 8k samples/sec.\n')

0 commit comments

Comments
 (0)