Tkinter grid_info()

Paul Malherbe <[email protected]>
Newsgroups gmane.comp.python.tkinter
Organization Tartan Financial Systems
Message-ID <[email protected]>
Please could someone tell me why this is not working?

from Tkinter import *

root = Tk()
e = Entry(root)
e.grid(column=0, row=0)
info = e.grid_info()
print "row:", info["row"], "column:", info["column"]
root.mainloop()

Running this displays the following error:

Traceback (most recent call last):
  File "test.py", line 6, in <module>
    grid_info = e.grid_info()
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 2000, in grid_info
    self.tk.call('grid', 'info', self._w))
TypeError: coercing to Unicode: need string or buffer, _tkinter.Tcl_Obj
found
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.