This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jjalocha
Recipients jjalocha
Date 2009-07-19.01:07:44
SpamBayes Score 1.776629e-09
Marked as misclassified No
Message-id <1247965666.73.0.755368316919.issue6518@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-07-19 01:07:46jjalochasetrecipients: + jjalocha
2009-07-19 01:07:46jjalochasetmessageid: <1247965666.73.0.755368316919.issue6518@psf.upfronthosting.co.za>
2009-07-19 01:07:44jjalochalinkissue6518 messages
2009-07-19 01:07:44jjalochacreate