repo.or.cz
/
python
/
dscho.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
The 0.5 release happened on 2/15, not on 2/14. :-)
[python/dscho.git]
/
Lib
/
dos-8x3
/
test_sun.py
blob
af18761310856ea7d119eb2fcde74d62989b8770
1
from
test_support
import
verbose
,
findfile
,
TestFailed
2
import
sunaudiodev
3
import
os
4
5
def
play_sound_file
(
path
):
6
fp
=
open
(
path
,
'r'
)
7
data
=
fp
.
read
()
8
fp
.
close
()
9
try
:
10
a
=
sunaudiodev
.
open
(
'w'
)
11
except
sunaudiodev
.
error
,
msg
:
12
raise
TestFailed
,
msg
13
else
:
14
a
.
write
(
data
)
15
a
.
close
()
16
17
def
test
():
18
play_sound_file
(
findfile
(
'audiotest.au'
))
19
20
test
()