New submission from Jerzy Jalocha N <jjalo...@gmail.com>: 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. ---------- components: Extension Modules messages: 90697 nosy: jjalocha severity: normal status: open title: Enable 'with' statement in ossaudiodev module type: feature request versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6518> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com