[pywin32-bugs] [ pywin32-Bugs-1226744 ] win32com: WMPlayer.OCX + threading doesn't work
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2005-06-24 04:12:26
|
Bugs item #1226744, was opened at 2005-06-24 04:12 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1226744&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: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: thinkinfinity (thinkinfinity) Assigned to: Nobody/Anonymous (nobody) Summary: win32com: WMPlayer.OCX + threading doesn't work Initial Comment: I'm trying to create an alarm of sorts. I narrowed the problem down to this: ------------------ problem.py ------------------ #!/usr/bin/env python import threading from win32com.client import Dispatch class MPlayer: def __init__(self, filename): self.filename = filename self.mp_handle = Dispatch('WMPlayer.OCX') self.mp_handle.currentPlaylist.appendItem(self.mp_handle.newMedia(filename)) def play(self): self.mp_handle.controls.play() mplayer = MPlayer('audiofile.mp3') threading.Timer(5, mplayer.play).start() #time.sleep(5) #mplayer.play() ------------------------------------------------- It seems like I can't get any other thread than the main one to do the actual playing: Interchanging: threading.Timer(5, mplayer.play).start() with: time.sleep(5) mplayer.play() doesn't work either so its not just threads. pywin32 Build 204 Thanks ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1226744&group_id=78018 |