*try something like::*
-----------------------------------------
collection = []
something = ['hello','there',1,2]
for i in something:
collection.append(type(i))
store = gtk.ListStore(*collection)
------------------------------------------
Leeuw van der, Tim wrote:
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]
<mailto:[EMAIL PROTECTED]>>:
[..]
gtk.ListStore([str] * x)
--
Johan Dahlin <[EMAIL PROTECTED] <mailto:[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/
--
O__
_/`.\
`=( '
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/