943,645 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 476
  • Python RSS
Feb 23rd, 2009
0

How to embed a software in wxPython?

Expand Post »
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
karenmaye is offline Offline
11 posts
since Feb 2009
Feb 25th, 2009
0

Re: How to embed a software in wxPython?

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:

Python Syntax (Toggle Plain Text)
  1. def mycallback(self, event):
  2. os.system("C:\Program Files\Myprog.exe")

Jeff
Reputation Points: 92
Solved Threads: 156
Practically a Master Poster
jrcagle is offline Offline
608 posts
since Jul 2006
Feb 26th, 2009
0

Re: How to embed a software in wxPython?

Thanks, Jeff! Big help.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
karenmaye is offline Offline
11 posts
since Feb 2009
Feb 26th, 2009
0

Re: How to embed a software in wxPython?

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
karenmaye is offline Offline
11 posts
since Feb 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: switch statement
Next Thread in Python Forum Timeline: Generating nice output





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC