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
488b7d93
Commit
488b7d93
authored
Dec 24, 1991
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
04fe492a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
13 deletions
+36
-13
Demo/scripts/README
Demo/scripts/README
+2
-1
Demo/sgi/al/alwatch.py
Demo/sgi/al/alwatch.py
+32
-11
Demo/sgi/al/intercom.py
Demo/sgi/al/intercom.py
+2
-1
No files found.
Demo/scripts/README
View file @
488b7d93
Contents of this directory:
Contents of this directory:
byteyears.py Print product of a file's size and age
byteyears.py Print product of a file's size and age
checkpyc.py Check presence and validity of ".pyc" files
copytime.py Copy one file's atime and mtime to another
eptags.py Create Emacs TAGS file for Python modules
eptags.py Create Emacs TAGS file for Python modules
fact.py Factorize numbers
fact.py Factorize numbers
findlinksto.py Find symbolic links to a given path (prefix)
findlinksto.py Find symbolic links to a given path (prefix)
from.py Summarize mailbox
from.py Summarize mailbox
lfact.py Factorize long numbers
lpwatch.py Watch BSD line printer queues
lpwatch.py Watch BSD line printer queues
mkreal.py Turn a symbolic link into a real file or directory
mkreal.py Turn a symbolic link into a real file or directory
objgraph.py Print object graph from nm output on a library
objgraph.py Print object graph from nm output on a library
...
...
Demo/sgi/al/alwatch.py
View file @
488b7d93
import
time
import
time
import
al
import
al
,
AL
dev
=
1
import
string
name
=
[
'input source'
,
'left input atten'
,
'right input atten'
,
\
dev
=
AL
.
DEFAULT_DEVICE
parameter_name
=
[
\
'input source'
,
'left input atten'
,
'right input atten'
,
\
'input rate'
,
'output rate'
,
\
'input rate'
,
'output rate'
,
\
'left speaker gain'
,
'right speaker gain'
,
\
'left speaker gain'
,
'right speaker gain'
,
\
'input count'
,
'output count'
,
'unused count'
,
\
'input count'
,
'output count'
,
'unused count'
,
\
'sync input to aes'
,
'sync output to aes'
,
\
'sync input to aes'
,
'sync output to aes'
,
\
]
]
x
=
al
.
queryparams
(
dev
)
source_name
=
[
'line'
,
'microphone'
,
'digital'
]
al
.
getparams
(
dev
,
x
)
params
=
al
.
queryparams
(
dev
)
for
i
in
range
(
1
,
len
(
params
),
2
):
params
[
i
]
=
-
1
while
1
:
while
1
:
time
.
millisleep
(
100
)
time
.
millisleep
(
100
)
y
=
x
[:]
old
=
params
[:]
al
.
getparams
(
dev
,
x
)
al
.
getparams
(
dev
,
params
)
if
x
<>
y
:
if
params
<>
old
:
for
i
in
range
(
0
,
len
(
x
),
2
):
for
i
in
range
(
0
,
len
(
params
),
2
):
if
x
[
i
+
1
]
<>
y
[
i
+
1
]:
if
params
[
i
+
1
]
<>
old
[
i
+
1
]:
print
name
[
x
[
i
]],
':'
,
y
[
i
+
1
],
'-->'
,
x
[
i
+
1
]
name
=
parameter_name
[
params
[
i
]]
if
params
[
i
]
=
AL
.
INPUT_SOURCE
:
if
0
<=
old
[
i
+
1
]
<
len
(
source_name
):
oldval
=
source_name
[
old
[
i
+
1
]]
else
:
oldval
=
''
newval
=
source_name
[
params
[
i
+
1
]]
else
:
oldval
=
`old[i+1]`
newval
=
`params[i+1]`
print
string
.
ljust
(
name
,
20
),
print
'('
+
string
.
rjust
(
oldval
,
10
)
+
')'
,
print
'-->'
,
print
string
.
rjust
(
newval
,
10
)
print
Demo/sgi/al/intercom.py
View file @
488b7d93
...
@@ -44,10 +44,11 @@ def client(hostname):
...
@@ -44,10 +44,11 @@ def client(hostname):
print
'client starting'
print
'client starting'
cmd
=
'rsh '
+
hostname
+
' "cd '
+
AUDIODIR
cmd
=
'rsh '
+
hostname
+
' "cd '
+
AUDIODIR
cmd
=
cmd
+
'; DISPLAY=:0; export DISPLAY'
cmd
=
cmd
+
'; DISPLAY=:0; export DISPLAY'
cmd
=
cmd
+
';
exec
'
+
PYTHON
+
' intercom.py -r '
cmd
=
cmd
+
'; '
+
PYTHON
+
' intercom.py -r '
for
flag
in
debug
:
cmd
=
cmd
+
flag
+
' '
for
flag
in
debug
:
cmd
=
cmd
+
flag
+
' '
cmd
=
cmd
+
gethostname
()
cmd
=
cmd
+
gethostname
()
cmd
=
cmd
+
'"'
cmd
=
cmd
+
'"'
if
debug
:
print
cmd
pipe
=
posix
.
popen
(
cmd
,
'r'
)
pipe
=
posix
.
popen
(
cmd
,
'r'
)
ack
=
0
ack
=
0
nak
=
0
nak
=
0
...
...
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