Hi guys i have made a simple gui to to run a single line of code, until now i run via cmd the command is
youtube-dl.py http://www.youtube.com/ --extract-audio --audio-format mp3
now i want to run this command with my gui.
My gui is this:
#!/usr/bin/python
import wx
APP_SIZE_X = 300
APP_SIZE_Y = 200
class MyButtons(wx.Dialog):
def __init__(self, parent, id, title):
wx.Dialog.__init__(self, parent, id, title, size=(APP_SIZE_X, APP_SIZE_Y))
wx.Button(self, 1, 'Close', (50, 130))
wx.Button(self, 2, 'Run', (150, 130), (110, -1))
self.Bind(wx.EVT_BUTTON, self.OnClose, id=1)
self.Bind(wx.EVT_BUTTON, self.OnRun, id=2)
self.Centre()
self.ShowModal()
self.Destroy()
def OnClose(self, event):
self.Close(True)
def OnRun(self,event):
print "ok for now"
app = wx.App(0)
MyButtons(None, -1, 'buttons.py')
app.MainLoop()
I need some help please, and thanks for your help...