Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

object has no attribute show

I have installed wxpython successfully which i verified by

import wx

But when I write a code

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()

it shows error

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'

what may be the solution ?

like image 576
Bishnu Bhattarai Avatar asked Apr 26 '13 07:04

Bishnu Bhattarai


1 Answers

Use

frame.Show() 

instead of

frame.show()

all are case sensitive in python

like image 111
Aswin Murugesh Avatar answered Oct 23 '22 16:10

Aswin Murugesh