Message90697
Actually, it is not possible to use the 'with' statement in the
ossaudiodev module:
>>> import ossaudiodev
>>> with ossaudiodev.open('/dev/dsp', 'r') as device:
... pass
...
Traceback (most recent call last):
File "<stdin>", line 1 in <module>
AttributeError: 'ossaudodev.oss_audio_device' object has no attribute
'__exit__'
In order to provide a similar interface as standard Python files, and
encourage safe coding practices, the 'with' statement should be
supported in the ossaudiodev module.
Thanks. |
|
Date |
User |
Action |
Args |
2009-07-19 01:07:46 | jjalocha | set | recipients:
+ jjalocha |
2009-07-19 01:07:46 | jjalocha | set | messageid: <1247965666.73.0.755368316919.issue6518@psf.upfronthosting.co.za> |
2009-07-19 01:07:44 | jjalocha | link | issue6518 messages |
2009-07-19 01:07:44 | jjalocha | create | |
|