"Jeffrey Barish" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Is there a way to interact with Windows Media Player from Python?  I would
> like to be able to do things like tell WMP to play a given sound file or to
> ask WMP for metadata about a sound file.
> -- 
> Jeffrey Barish

WMP can be automated using COM:

import win32com.client

w=win32com.client.gencache.EnsureDispatch('WMPlayer.OCX',0)
pl=w.playlistCollection.getByName('All Music')[0]
s=pl[0]
print s.name, s.duration
w.currentMedia=s

       Roger


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to