Re: cut paste text between tkinter widgets

2005-08-04 Thread Repton
Christopher Subich wrote: In experimenting with this, I found a slight... fun issue involved in this. Selection_get is the correct method to call, but it doesn't quite work out of the box. g.selection_get() Traceback (most recent call last): File stdin, line 1, in ? File

Re: return None

2005-07-24 Thread Repton
geon wrote: Ximo wrote: Can I do a function which don't return anything? Nothing is None, or isnt? A woodman was carrying a sack full of chopped wood on his back. His sack was heavy and filled beyond its limit. The man, bent under his bulky burden, was struggling not to drop any of the wood

Searching through a list of tuples

2005-07-11 Thread Repton
I often find myself storing data in a list of tuples, and I want to ask questions like what is the index of the first tuple whose 3rd element is x, or give me the first tuple whose 2nd element is y. I know I can do [elem for elem in lst if elem[3] == x][0] or (elem for elem in lst if elem[2] ==