How to embed a software in wxPython?

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Feb 2009
Posts: 11
Reputation: karenmaye is an unknown quantity at this point 
Solved Threads: 0
karenmaye karenmaye is offline Offline
Newbie Poster

How to embed a software in wxPython?

 
0
  #1
Feb 23rd, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 608
Reputation: jrcagle is on a distinguished road 
Solved Threads: 150
jrcagle jrcagle is offline Offline
Practically a Master Poster

Re: How to embed a software in wxPython?

 
0
  #2
Feb 25th, 2009
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:

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

Jeff
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 11
Reputation: karenmaye is an unknown quantity at this point 
Solved Threads: 0
karenmaye karenmaye is offline Offline
Newbie Poster

Re: How to embed a software in wxPython?

 
0
  #3
Feb 26th, 2009
Thanks, Jeff! Big help.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 11
Reputation: karenmaye is an unknown quantity at this point 
Solved Threads: 0
karenmaye karenmaye is offline Offline
Newbie Poster

Re: How to embed a software in wxPython?

 
0
  #4
Feb 26th, 2009
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Python Forum


Views: 266 | Replies: 3
Thread Tools Search this Thread



Tag cloud for Python
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC