tkinter text widget question

rafi rafi at
Sun Aug 21 20:41:57 CEST 2005

William Gill wrote:
> The tkinter text widget uses indexes to identify row:column offsets 
> within the text, but it seems counter intuitive to have to convert row 
> and column integers to a string like "0.1'.  It's great that index can 
> take a string, but what about looping through rows and columns?  Am I 
> missing a way to use integers directly, or should I create a class that 
> takes the two integers and returns them formatted as the proper string?

tkinter relies on tk that is for tcl at first, and in tcl every thing is 
a string (more or less).

"%s.%s" % (row, column)

should answer your problem easily

my 2 cents


	"Imagination is more important than knowledge."
	                            (Albert Einstein)

More information about the Python-list mailing list