[python-win32] How do I control Windows Media Player from Python?

Moore, Paul Paul.Moore at atosorigin.com
Tue Aug 5 17:34:57 EDT 2003


I'd like to be able to connect to Windows Media Player from Python. As my first (simple) example, I'd like to get the name of the currently playing track, which seems to be as easy as

    name = Player.currentMedia.name

but - and here's the problem - I need Player to be a Dispatch object pointing to the (currently running) Windows Media Player instance. No matter how I try, I can't get this step. I can find nothing in the MSDN documentation (which spends most of its time explaining how to embed media in a web page...)

Can anyone help?
Thanks,
Paul Moore



More information about the Python-win32 mailing list