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 trent
Recipients trent, vstinner
Date 2012-08-22.06:40:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1345617615.56.0.436031412864.issue15746@psf.upfronthosting.co.za>
In-reply-to
Content
Affirmative:


E:\Apps\activestate-python-2.7.2.5-x86>python
ActivePython 2.7.2.5 (ActiveState Software Inc.) based on
Python 2.7.2 (default, Jun 24 2011, 12:21:10) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import test.test_winsound
>>> test.test_winsound._have_soundcard()
False
>>> import winsound
>>> winsound.PlaySound('!"$%&/(#+*', winsound.SND_ALIAS | winsound.SND_NODEFAULT)
>>>

No exception raised.  (No sound is played, either, FWIW.)

I like the approach taken by the method before test_alias_nofallback():

    def test_alias_fallback(self):
        # This test can't be expected to work on all systems.  The MS
        # PlaySound() docs say:
        #
        #     If it cannot find the specified sound, PlaySound uses the
        #     default system event sound entry instead.  If the function
        #     can find neither the system default entry nor the default
        #     sound, it makes no sound and returns FALSE.
        #
        # It's known to return FALSE on some real systems.

        # winsound.PlaySound('!"$%&/(#+*', winsound.SND_ALIAS)
        return

I suspect that'll solve all our problems ;-)
History
Date User Action Args
2012-08-22 06:40:15trentsetrecipients: + trent, vstinner
2012-08-22 06:40:15trentsetmessageid: <1345617615.56.0.436031412864.issue15746@psf.upfronthosting.co.za>
2012-08-22 06:40:15trentlinkissue15746 messages
2012-08-22 06:40:14trentcreate