New submission from Tom Felker <tomfel...@gmail.com>: PlaySound supposedly lets you play a .WAV file whose contents are stored in a string, by passing the string and flags including winsound.SND_MEMORY. I'm trying to use BytesIO object and the wave module to make a file in-memory, and pass this to winsound. It's a TypeError if I pass the resultant bytes object directly, and if I pass a string object, I get
TypeError: must be str without null character or None, not str Since wav files can contain zeros, for the feature to work at all, the C code would need to detect the SND_MEMORY flag and interpret the first argument as a bytes object, instead of a null-terminated string, in that case. ---------- components: Library (Lib) messages: 131583 nosy: Tom.Felker priority: normal severity: normal status: open title: winsound.PlaySound() with SND_MEMORY should accept bytes instead of strings versions: Python 3.1 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11620> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com