Tkinter.Text can never be empty?

Harry Pehkonen harry.pehkonen at
Tue Sep 16 18:27:00 CEST 2003

While setting up some unit tests, I came to the conclusion that a
Tkinter Text widget can never be empty, but will always (?) contain a
\n.  Here is a brief example:

>>> import Tkinter
>>> t = Tkinter.Text()
>>> t.get(0.0, Tkinter.END)
>>> t.delete(0.0, Tkinter.END)
>>> t.get(0.0, Tkinter.END)

My apologies, but I have not checked whether or not this can be
reproduced in Tcl/Tk (which I think might have been appropriate).

My question is:  Is there *always* a trailing \n, is this a bug, or am
I doing something silly?


More information about the Python-list mailing list