Bugs item #3102414, was opened at 2010-11-04 06:12
Message generated for change (Comment added) made by mhammond
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3102414&group_id=78018
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: com
Group: None
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Private: No
Submitted By: Gregory Petrosyan (gregory_p)
Assigned to: Nobody/Anonymous (nobody)
Summary: Script that works from PythonWin does not work from python
Initial Comment:
I've encountered a strange issue: script like this:
import win32com.client
w = win32com.client.Dispatch('WMPlayer.OCX.7')
t = w.newMedia('C:/test.wma')
w.currentMedia = t
when launched from python.exe, does nothing (without any exceptions etc.); when launched from PythonWin, sound is produced. Also, if I try to use WMPlayer.OCX.7 to play audio CD, then it *does* spin up when launched from python.exe, but no sound is produced again. From PythonWin, everything works as expected.
(I should clarify, this is not the sound output issue: w.playState property does end up being different in these 2 scenarios!)
What can be the difference between PythonWin and python.exe that causes this strange bug?
----------------------------------------------------------------------
>Comment By: Mark Hammond (mhammond)
Date: 2010-11-12 13:56
Message:
Pythonwin is built on MFC and therefore gets support for COM "controls" (or
OCX) for free. python.exe hosted would need this support explicitly added
using a fair bit of COM magic - a tutorial on hosting controls from any
language might get you going.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3102414&group_id=78018
|