[pygtk] gtk.treestore creation by script
ksadil
ksadil at proactiveindustrial.net
Sun Jan 11 19:52:41 WST 2009
Hello,
I am trying to make my treeview handling code a bit cleaner (and less
verbose). I find myself rewriting very similar code each time that could be
wrapped up in classes or methods, as I tend to make and use them in a similar
way each time. I would like to create a "spec" file, and have the
script read the spec file and return the treeview and corresponding
treestore. The only problem is that I don't know how to pass a list of types
to the gtk.treestore() method at runtime.
I would like to be able to do something like:
column_types=[]
column_types.append(gtk.gdk.Pixbuf)
column_types.append(gobject.TYPE_STRING)
column_types.append(gobject.TYPE_INT)
my_treestore = gtk.treestore(column_types)
Any ideas or suggestions would be greatly appreciated.
Thanks,
Kim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20090111/4c520420/attachment.htm
More information about the pygtk
mailing list