[New-bugs-announce] [issue6317] winsound.PlaySound doesn't accept non-unicode string

Hirokazu Yamamoto report at bugs.python.org
Sun Jun 21 03:36:31 CEST 2009


New submission from Hirokazu Yamamoto <ocean-city at m2.ccsnet.ne.jp>:

winsound.PlaySound doesn't accept non-unicode string.

Python 3.1rc2+ (py3k, Jun 14 2009, 14:07:51) [MSC v.1200 32 bit (Intel)]
on win3
2
Type "help", "copyright", "credits" or "license" for more information.
>>> import winsound
>>> winsound.PlaySound("あ.wav", winsound.SND_LOOP | winsound.SND_ASYNC)

# Rings bell forever.

It's easy to fix this on python3x. I'm not sure this should be fixed in
python2.x, and if should be fixed, probably needs some code like in
posixmodule.c.

  /* try parse args as unicode */
      /* call PlaySoundW */
  /* if fail, try parse args as ascii */
      /* call PlaySoundA */

----------
components: Extension Modules, Windows
files: py3k_winsound.patch
keywords: patch
messages: 89554
nosy: ocean-city
severity: normal
status: open
title: winsound.PlaySound doesn't accept non-unicode string
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14325/py3k_winsound.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6317>
_______________________________________


More information about the New-bugs-announce mailing list