Currently running python 2.6, wxpython 2.8 unicode win32 on the vista platform... When I try to run a sample app in the wx tutorial section the program stops responding as soon as I mouse over it. Heres the code.

import wx

"""Example with a 2D grid of sizers of sorts for more complex widget placement.""" 

app = wx.App(redirect=False)

window = wx.Frame(None, title = 'Sample GUI App',
                  pos = (100,100), size = (400,500))
background = wx.Panel(window)

loadBtn = wx.Button(background, label = 'Load')
transferBtn = wx.Button(background, label = 'Transfer')
inputArea = wx.TextCtrl(background)
transferArea = wx.TextCtrl(background, style = wx.TE_READONLY | wx.TE_MULTILINE)

exOneBtn = wx.Button(background, label = 'example one')
exTwoBtn = wx.Button(background, label = 'example two')

horizontalBoxOne = wx.BoxSizer()
horizontalBoxOne.Add(exOneBtn, proportion = 1, border = 0)
horizontalBoxOne.Add(exTwoBtn, proportion = 1, border = 0)

horizontalBoxTwo = wx.BoxSizer()
horizontalBoxTwo.Add(inputArea, proportion = 1, border = 0)
horizontalBoxTwo.Add(transferBtn, proportion = 0, border = 0)
horizontalBoxTwo.Add(loadBtn, proportion = 0, border = 0)

verticalBox = wx.BoxSizer(wx.VERTICAL)
verticalBox.Add(horizontalBoxOne, proportion = 0, flag = wx.EXPAND, border = 0)
verticalBox.Add(horizontalBoxTwo, proportion = 0, flag = wx.EXPAND, border = 0)
verticalBox.Add(transferArea, proportion = 1, flag = wx.EXPAND, border = 0)


any ideas?

Recommended Answers

All 9 Replies

Well i can just say that it is not the code's fault. It runs of windows XP fine so i would have to say that the problem most likely lies in the installation of something or your operating system.

yeah i uninstalled wx and reinstalled it... well now it works for a while.. it randomly crashed. dont know what sets it off

ok what the f*&#. The apps work fine during an idle session, it starts up when I dclick the .py file and looks like its running fine but as soon as I mouse over it python.exe stops responding. Anyone else deal with this before?? I've unistalled everything restarted a hundred times googled til the end of the internet and I'm about to kick my dog in the nuts....for his sake.. help.

This is most likely Vista related. Are you running this wx code stand-alone or using IDLE to launch it?

thats the best part. It works fine with idle.. But as a standalone it crashes.

Are you by chance running the program as admin? I think that other Vista users on this forum have been bitten by this problem. If you right-click on the program I think there's an option to "Run as admin" or similar (I don't have Vista so I have no idea).

This has helped others, maybe it can help you too, although since the program itself isn't an executable perhaps you need to be running python as admin. I'm not sure.. let me know whether this option exists for you or not.

commented: helpful +1

Use WING IDE. I run all my script on its run/debug options and have never let me down. Its stripped version 101 is superior to IDLE in that it have debugger, and doesn't clash!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.