|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Probably beginner python/wxpython question
Hello,
I'm learning python and wxPython and am having a problem that seems like it should have an easy solution. All I am trying to do is pass arguments to a file selection class. The argument is going to be a base path for the file selection module to show to the user when opened. Here are snippets of the starter code with which I am working and I know works fine: class FileSelectionBox(wx.combo.ComboCtrl): def __init__(self, *args, **kw) wx.combo.ComboCtrlinit__(self, *args, **kw) () class TestPanel(wx.Panel): def __init__() cc = FileSelectionBox(self, size=(250,-1)) I've tried many things but the closest is something like this: class FileSelectionBox(wx.combo.ComboCtrl): def __init__(self, cc1, *args, **kw) wx.combo.ComboCtrlinit__(self, *args, **kw) self.cc1 = cc1 () class TestPanel(wx.Panel): def __init__(self, parent): () cc = FileSelectionBox(self, cc1="Test", size=(250,-1)) Which throws TypeError: __init__() got multiple values for keyword argument 'cc1' Google search does not seem to pull up much explanation of this error and everything I've found on classes in general show passing with the same kind of method as I'm trying. Any suggestions? |
![]() |
| Viewing: Web Development Archives > Mailing Lists > Python > Probably beginner python/wxpython question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|