1 # Listen to the input on host argv[1].
3 import sys
, al
, AL
, posix
10 sys
.stderr
.write('usage: ' + sys
.argv
[0] + ' hostname\n')
12 hostname
= sys
.argv
[1]
13 cmd
= 'exec rsh </dev/null ' + hostname
+ \
14 ' "cd /ufs/guido/mm/demo/audio; ' + \
15 'exec /ufs/guido/bin/sgi/python record.py"'
16 pipe
= posix
.popen(cmd
, 'r')
17 config
= al
.newconfig()
18 config
.setchannels(AL
.MONO
)
19 config
.setqueuesize(QSIZE
)
20 port
= al
.openport('', 'w', config
)
22 data
= pipe
.read(BUFSIZE
)
25 sys
.stderr
.write(sys
.argv
[0] + ': end of data\n')
26 if sts
: sys
.stderr
.write('rsh exit status '+`sts`
+'\n')
33 except KeyboardInterrupt: