Python
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives Mailing Lists Python

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old March 12th, 2008, 11:30 PM
Dennon McMillan
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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?

Reply With Quote
Reply

Viewing: Web Development Archives Mailing Lists Python > Probably beginner python/wxpython question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway