看看这段Python代码问题出在哪
照着书上写的,执行时报错(Python2.6)
import wx
class InsertFrame(wx.Frame):
def __init__(self,parent,id):
wx.Frame.__init__(self,parent,id,'Frame With Button',size=(300,100))
panel = wx.Panel(self)
button = wx.Button(panel,label="Close",pos=(125,20),
size=(50,50))
self.Bind(wx.EVT_BUTTON,self.OnCloseMe,button)
self.Bind(wx.EVT_CLOSE,self.OnCloseWindow)
def OnCloseMe(self,event):
self.Close(True)
def OnCloseWindow(self,event):
self.Destroy()
if __name__=='__main__':
app = wx.PySimpleApp()
frame = InsertFrame(parent=None,id=-1)
frame.Show()
app.MainLoop()
报错信息如下:
Traceback (most recent call last):
File "D:\Python26\test\wx\button.py", line 19, in <module>
frame = InsertFrame(parent=None,id=-1)
File "D:\Python26\test\wx\button.py", line 4, in __init__
wx.Frame.__init__(self,parent,id,'
相关问答:
我现在用的是eclipse 那个插件,可能是因为没配置明白的问题,感觉不好,没有一些必要的功能。
后来我换了Eric4,比eclipse插件好用不少,但是缺少一个我最希望有的功能:代码追踪, ......
d = {"a":"a","b":"b","c":"c"}
print d
为什么输出是:{'a': 'a', 'c': 'c', 'b': 'b'} ......
我想用python写服务端,C#写客户端,另外想把客户端C#中的对象序列化后传给服务端,用python反序列化后重建对象,不知道有没有这个可能?如果有可能能否提供个思路?
一切皆有可能。
思路你已经说的挺清楚的了。 ......
python如何解压缩.Z的文件啊,在windows系统环境下
Q7Z 是一款基于 Qt4 的 7z 压缩工具
http://code.google.com/p/k7z/
开源的
http://sourceforge.net/projects/k7z/
LS的能具体说一说吗?
......
python和pyqt以及Eric4都已经配置好了,打开Eric4写个python程序比如简单的
print“hello,world”,怎么编译运行了,Start菜单的所有命令都出现和图中差不多的对话框,应当怎么运行了?
求大家指教
没有人用 ......