0

Hi I'm new in this community. I am working on a GUI using wxPython and I would like to embed an Image-to-Video converter in my program by pressing a button. Is this possible? If yes, can someone please send me a code? I will really appreciate it. Thank you so much.

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by karenmaye
0

Well, here's the basic idea. You have a button in your GUI. The button has a callback function. That function can then call your program. Here's a typical instance:

def mycallback(self, event):
    os.system("C:\Program Files\Myprog.exe")

Jeff

0

Hey, I tried doing the code but an error shows up each time I press the button. Here's the code:

imageconverterButton = wx.Button(self, wx.ID_ANY, "Image Converter")
imageconverterButton.SetToolTip(wx.ToolTip("converts to video"))
self.Bind(wx.EVT_BUTTON, self.onConvert, imageconverterButton)

def onConvert(self, evt):
os.system("C:\Program Files\Image Video Converter")

When I try to run the program, it says that C:\Program is not recognized as an internal or external command, operable program or batch file.

What can I do to remedy this? Thank you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.