2013-04-26 163 views
3

我已經安裝了wxpython成功,我通過對象沒有屬性顯示

import wx 

驗證,但是當我寫代碼

import wx 
class gui(wx.Frame): 
    def __init__(self,parent,id): 
     wx.Frame.__init__(self, parent,id,'Visualisation for Telecom Customer Data', size = (300,200)) 

if __name__ =='__main__': 
    app = wx.PySimpleApp() 
    frame = gui(parent = None, id = -1) 
    frame.show() 
    app.MainLoop() 

它顯示錯誤

Traceback (most recent call last): 
    File "D:\Bishnu\BE\4th year\7th semester\Major Project I\Workspace\Wxpython\default\GUI.py", line 13, in <module> 
    frame.show() 
AttributeError: 'gui' object has no attribute 'show' 

可能是什麼解決方案 ?

回答

5

使用

frame.Show() 

,而不是

frame.show() 

都是情況蟒蛇

敏感