[Tutor] executing a script from a script

Jeff Peery jeffpeery at seametrics.com
Tue Aug 26 20:31:44 CEST 2008


Hello,

I have a simple wx app that I need some help with. This application uses the
serial ports to communicate with an industrial product. I first check that
my python application is compatible with the industrial product by asking
the industrial product for its revision number. If the revision number is
too old I want to kill my python application and launch an older python
application. To do this I am using the following:

 

# launch old program

execfile('theoldpythonprogram.py')

# kill this App (wx.Frame object)

self.Destroy()

 

The problem is that the self.Destroy() seems to kill both the current python
program and the one I just launched. How can I launch a new program and kill
the current one without killing the new one as well?

 

Thanks!

 

Jeff

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080826/d533a6b1/attachment.htm>


More information about the Tutor mailing list