Hi,
I have the following problem on Windows Me. When I run a simple scripts two times, it works fine the first time and crash completely the computer the second time forcing me to reboot. This problem does not appear under Win98.
Would you have any idea?
Thanks in advance,
Boris
import os
from wxPython.wx import *
ID_ABOUT=101
ID_EXIT=110
class MainWindow(wxFrame):
def __init__(self,parent,id,title):
wxFrame.__init__(self,parent,-4,title,size=(200,100),style=wxDEFAULT_FRAME_STYLE)
panel = wxPanel(self, -1)
self.CreateStatusBar()
filemenu=wxMenu()
filemenu.Append(ID_ABOUT, "&About","Info")
filemenu.AppendSeparator()
filemenu.Append (ID_EXIT, "E&xit","Terminate")
menuBar=wxMenuBar()
menuBar.Append (filemenu,"&File")
self.SetMenuBar(menuBar)
sizer = wxBoxSizer(wxVERTICAL)
box = wxBoxSizer(wxHORIZONTAL)
label = wxStaticText(self, -1, "Field #1:")
box.Add(label, 0, wxALIGN_CENTRE|wxALL, 5)
text = wxTextCtrl(self, -1, "", size=(80,-1))
box.Add(text, 1, wxALIGN_CENTRE|wxALL, 5)
btn = wxButton(self, wxID_OK, " OK ")
box.Add(btn, 0, wxALIGN_CENTRE|wxALL, 5)
sizer.AddSizer(box, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5)
self.Show(true)
app = wxPySimpleApp ()
frame = MainWindow (None, -1, "Join")
app.MainLoop ()
···
_____________________________________________________________________
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France