python - getting Type error when i call a function -


i new python , using wxpython gui.

few lines of code is:

         def __init__(self):              panel=wx.panel(self, -1)              but1 = wx.button(panel, " name", pos, size)              self.bind(wx.evt_button, self.click, but1)          def click(self, event):                subprocess.call(" **************", shell=true) 

and getting type error:

          traceback (most recent call last):           file "create.py", line 122, in <module>           build().show()           file "create.py", line 59, in __init__           self.bind(wx.evt_button,self.click,but1)           file "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 3918, in bind           event.bind(self, id, id2, handler)                         file "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 3992, in bind           target.click(id1, id2, et, function)           typeerror: connect() takes 2 arguments (5 given) 

i commented out except 'click 'function still getting this. please suggest me doing wrong , how can resolve it?


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -