2006年04月07日 星期五 10:55
我的源程序如下
import wx
class mp3infoprocessFrame(wx.Frame):
def __init__(self,parent,id):
wx.Frame.__init__(self,parent,id,"test",size=(500,500),style=
wx.DEFAULT_FRAME_STYLE)
panel=wx.Panel(self)
panel.SetBackgroundColour('White')
if __name__=="__main__":
apple=wx.PySimpleApp()
frame=mp3infoprocessFrame(parent=None,id=-1)
frame.Show(True)
apple.MainLoop
直接运行这个程序,结果也正确
但是等我把这个frame关了以后,再运行这个程序,就会出现
PyNoAppError: The wx.App object must be created first!的提示,这是什么原因呢?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060407/7097f250/attachment.html
Zeuux © 2025
京ICP备05028076号