I believe that actually it should be:

 

gtk.ListStore(*[str] * x)

 

With an extra ‘*’ in front of the argument-list; otherwise it’s 1 argument to the ListStore constructor instead of an x number of positional arguments.

 

Cheers,

 

--Tim


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Arie Timmerman
Sent: maandag 20 februari 2006 17:48
To: [email protected]
Subject: Re: [pygtk] Listtore

 

 

2006/2/20, Johan Dahlin <[EMAIL PROTECTED]>:

[..]
gtk.ListStore([str] * x)

--
Johan Dahlin <[EMAIL PROTECTED]>
Async Open Source


It doesn't work actually:
>>> store = gtk.ListStore([str]*4)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: could not get typecode from object

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to