martedì 4 settembre 2007

What i've done....

I think it's not very usefull what i've done this time....

I've added a tab in the messenger panel in which play videos.




I publish here the snippet of code to implement playing videos because i don't know otherwise
_____________ cut __________________________
# filename is the variable captured by drag&drop event
# scope is the panel in which is embedded mplayer...

self.process = wx.Process()
x,y = self.scope.pnl1.GetSize()
self.options = ' -nolirc -nocache -really-quiet -nojoystick -geometry ' + str(50)+'x'+str(50) +' -slave -wid '

self.command = self.scope.mpCommand + ' ' + self.options+ str(self.scope.pnl1.GetHandle())+ ' ' +'\"'+filename+'\"'

self.process.Redirect()
self.pid = wx.Execute(self.command, wx.EXEC_ASYNC , self.process)
print 'pid ' + str(self.pid)
self.outstream = self.process.GetOutputStream()
self.errorStream = self.process.GetErrorStream()
self.inpstream = self.process.GetInputStream()
__________________ cut __________________

Nessun commento: