[Python-Dev] Still looking for volunteer to run Windows buildbot

Trent Mick trentm at ActiveState.com
Tue Mar 14 02:08:19 CET 2006


[Martin v. Loewis wrote]
> Trent Mick wrote:
> > I do have a sound card in that box, however, the "Sounds and Multimedia
> > Properties" dialog (off Control Panel) says that there are "No Playback
> > Devices" for Sound Playback. So I guess that is it. Maybe the sound card
> > in that box is not hooked up. Grrr. I certainly don't care about the
> > sound card for that box but I don't want the test suite to keep
> > reporting a spurious failure.
> 
> Now, if there was a reliable check whether a soundcard is present, that
> check could be run as a prerequisite, then raising TestSkipped if no
> soundcard is present.

Roger on python-win32 had an answer which works for me:

    [Roger Upole wrote]
    > WMI can list sound devices.
    >
    > import win32com.client
    > wmi=win32com.client.GetObject('winmgmts:')
    > scs=wmi.InstancesOf('win32_sounddevice')
    > for sc in scs:
    >   print  sc.Properties_('Name'), sc.Properties_('Status')

However, that requires PyWin32 so can't really use that for
test_winsound.py. My understanding of ctypes is that it can NOT replace
win32com, but I'd be happy to be wrong here. Thomas?

Trent

-- 
Trent Mick
TrentM at ActiveState.com


More information about the Python-Dev mailing list