Why is python shutting down?

Thanks Robin. I had to create a copy of python.exe (which I named python2.exe) and then ran "python2.exe update_manifest.py" from the command line. Result -problem solved!

Best regards,
Timothy Grove

Robin Dunn wrote:

···

Timothy W. Grove wrote:

I've been struggling with a mystery problem as to why the following code causes Python to crash: (It started out larger, but I whittled it down to about as small an app as it gets.)

>> import wx
>> app = wx.PySimpleApp()
>> f = wx.Frame(None, -1, "Whats goin' on?!!")
>> p = wx.Panel(f)
>> f.Show()
>> app.MainLoop()

This simply displays a frame containing a panel and it starts okay. I can resize the frame and drag it around, but just as soon as the cursor enters the window area, I get an error dialog telling me that python.exe has stopped working. (I'm sure you know the one I mean?!! And Windows offer to check online for a solution to the problem doesn't return any answers ... ) I get this problem both when I'm running it from SPE and when I run it as a standalone program, but when I run it from IDLE, things seem okay. It also runs okay on another WinXP machine, but I haven't checked the python and wxpython versions for that PC. I'm using a Toshiba Satellite Pro with the following configuration:

- platform : win32 (Vista)
- python : 2.6.1
- wxPython : 2.8.9.2

I'm guessing its more a compatibility or conflict on my own machine, but I really don't know where to look. I have tried reinstalling both Python and wxPython to no avail. If anyone has some clue to what is going on I would love to hear about it. Thanks!

This is due to Python's manifest not loading the new themed controls DLL. For some people it causes a crash like you are seeing, for others things work but just look ugly. See the "Python 2.6 NOTE" in the README file that was available during the install, and is now in the docs folder in the wx package dir. It will tell you what you can do to hack your Python.exe to make it work, or you can go back to Python 2.5 until we get a better fix.