kiki with new wxPython

2007年08月16日 13:23

Kiki是一个很不错的Python Regex Tester工具。昨天给猛禽看了截图之后,他也立即表示要去装一个。
可是今天他却很郁闷的在Gtalk上跟我说,运行出错,提示说

File "kiki.py", line 317, in __do_layout
TopPaneSizer.Add(wx.NotebookSizer(self.Notebook), 1, wx.EXPAND, 0)
AttributeError: 'module' object has no attribute 'NotebookSizer'


上网查了一下原因,原来是在wxPython的新版中,NotebookSizer被废弃了。
因此,只要把原来的
TopPaneSizer.Add(wx.NotebookSizer(self.Notebook), 1, wx.EXPAND, 0)

改成
TopPaneSizer.Add(self.Notebook, 1, wx.EXPAND, 0)

程序即可正常运行。

2条评论

gravatar for 猛禽
wxPython真是太BT了,也不提供兼容。 猛禽 (URL) - 2007年08月16日 13:28

gravatar for 令狐虫
昨天写cherrypy的时候发现,cherrypy跟wxPython一样BT——甚至更BT——从2.0到2.1到2.2到3.0,API的变化从未停止过,以至于在前一版上运作良好的程序换成新版就频频出错。要改很多东西才能正常运行。

现在我都不知道这算不算开源软件的一个特点了——当然我是非常不喜欢这种特点的。 令狐虫 (URL) - 2007年08月17日 11:45




Remember personal info?
Notify
Hide email
Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
Design downloaded from free website templates.