| | |
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
Views: 266 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for Python
abrupt apache application argv beginner binary book calculator change cipher code command compile converter dictionaries dictionary dynamic event examples excel file float format ftp function google gui homework import inches input java keyboard launcher line linux list lists loop maze microphone mouse movingimageswithpygame newb number numbers obexftp output parsing path permissions phonebook plugin port prime program programming projects py2exe pygame pyqt python random recursion recursive refresh remote scrolledtext search session signal simple ssh string strings strip table terminal text thread threading time tkinter tlapse trick tuple tutorial ubuntu unicode unit urllib urllib2 valueerror variable verify vigenere windows wordgame wxpython xlwt





