Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3ac494b5
Commit
3ac494b5
authored
Mar 30, 1992
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new '==' syntax
parent
d86936e3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
Demo/sgi/al/alwatch.py
Demo/sgi/al/alwatch.py
+1
-1
Demo/sgi/al/intercom.py
Demo/sgi/al/intercom.py
+6
-6
Demo/sgi/al/playaiff.py
Demo/sgi/al/playaiff.py
+2
-2
Demo/sgi/al/playold.py
Demo/sgi/al/playold.py
+3
-3
No files found.
Demo/sgi/al/alwatch.py
View file @
3ac494b5
...
...
@@ -24,7 +24,7 @@ while 1:
for
i
in
range
(
0
,
len
(
params
),
2
):
if
params
[
i
+
1
]
<>
old
[
i
+
1
]:
name
=
parameter_name
[
params
[
i
]]
if
params
[
i
]
=
AL
.
INPUT_SOURCE
:
if
params
[
i
]
=
=
AL
.
INPUT_SOURCE
:
if
0
<=
old
[
i
+
1
]
<
len
(
source_name
):
oldval
=
source_name
[
old
[
i
+
1
]]
else
:
...
...
Demo/sgi/al/intercom.py
View file @
3ac494b5
...
...
@@ -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
)
...
...
Demo/sgi/al/playaiff.py
View file @
3ac494b5
...
...
@@ -22,11 +22,11 @@ def main():
except
EOFError
:
break
if
v
:
print
'header:'
,
`type`
,
size
if
type
=
'COMM'
:
if
type
=
=
'COMM'
:
nchannels
,
nsampframes
,
sampwidth
,
samprate
=
\
aiff
.
read_comm_chunk
(
f
)
if
v
:
print
nchannels
,
nsampframes
,
sampwidth
,
samprate
elif
type
=
'SSND'
:
elif
type
=
=
'SSND'
:
offset
,
blocksize
=
aiff
.
read_ssnd_chunk
(
f
)
if
v
:
print
offset
,
blocksize
data
=
f
.
read
(
size
-
8
)
...
...
Demo/sgi/al/playold.py
View file @
3ac494b5
...
...
@@ -19,11 +19,11 @@ def main():
#
magic
=
f
.
read
(
4
)
extra
=
''
if
magic
=
'0008'
:
if
magic
=
=
'0008'
:
rate
=
8000
elif
magic
=
'0016'
:
elif
magic
=
=
'0016'
:
rate
=
16000
elif
magic
=
'0032'
:
elif
magic
=
=
'0032'
:
rate
=
32000
else
:
sys
.
stderr
.
write
(
'no magic header; assuming 8k samples/sec.
\
n
'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment