Найти - Пользователи
Полная версия: Python и WMPlayer (Win32API? COM?)
Начало » Python для новичков » Python и WMPlayer (Win32API? COM?)
1
chuwy
Здравствуйте.
Мне нужно извлечь из Windows Media Player'а информацию о проигрываемой композиции. Установил win32api, Но
from win32com import Dispatcher
player = Dispatch("WMPlayer.OCX")
player.controls.play()
Не работает, т.е. player вообще не выдаёт полезной информации.
Есть ли другие способы взаимодействия? И вообще насколько это целесобразно пользоваться COM? Он ведь вроде устарел.
P.S. Windows 7 & WMPlayer 12
pyuser
google выдал вот такой ответ разработчика pywin32:
As far as I know, the WMPlayer OCX will only work as a true “control” - not
as a regular COM object. That means it must be hosted in a ‘control
container’, and these are not trivial to implement. Pythonwin and wxWindows
are the only 2 Python environments I am aware of capable of hosting such a
control.

Mark
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB