| | |
How to embed a software in wxPython?
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2006
Posts: 608
Reputation:
Solved Threads: 150
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:
Jeff
Python Syntax (Toggle Plain Text)
def mycallback(self, event): os.system("C:\Program Files\Myprog.exe")
Jeff
•
•
Join Date: Feb 2009
Posts: 11
Reputation:
Solved Threads: 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.
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.
![]() |
Other Threads in the Python Forum
- Previous Thread: Serial Port Sniffer
- Next Thread: Generating nice output
| Thread Tools | Search this Thread |
Tag cloud for Python
accessdenied apache application argv beginner book change code color dictionary dynamic edit editing enter examples excel file filename float format ftp function gui homework import inches input java keyboard lapse library line lines linux list lists loop microphone mouse movingimageswithpygame mysql newb number numbers numeric output parameters parsing path port prime program programming projects py2exe pygame pyopengl pyqt python random recursion recursive redirect remote reverse rpg scrolledtext search server session simple smtp software sprite ssh statictext string strings syntax table tennis terminal text thread threading time tkinter tlapse trick tuple tutorial ubuntu unicode unit urllib urllib2 variable windows wordgame wxpython





