Message414393
The library function winsound.PlaySound takes a sound parameter. One of the valid arguments is a path to a WAV filename.
Since Python 3.4, paths can be cleanly represented with PathLib.Path instances.
However, if you pass a Path instance to PlaySound, it responds with:
TypeError: 'sound' must be str or None, not 'WindowsPath'
This can be quickly fixed in the caller by passing str(the_path_instance) instead, but it would be cleaner if PlaySound accepted Python's preferred method of representing paths. |
|
Date |
User |
Action |
Args |
2022-03-03 00:02:59 | Julian-O | set | recipients:
+ Julian-O |
2022-03-03 00:02:59 | Julian-O | set | messageid: <1646265779.67.0.979185331042.issue46905@roundup.psfhosted.org> |
2022-03-03 00:02:59 | Julian-O | link | issue46905 messages |
2022-03-03 00:02:59 | Julian-O | create | |
|