This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ghoul
Recipients ghoul, gpolo
Date 2013-05-09.14:36:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Python version: 3.3.0 32bit
OS: Windows 7 Service Pack 1 64bit

The peer_create method of the Text class, introduced in changeset
<71041c0dedd5> in response to issue <2843> creates a tk text widget
but does not instantiate Text. Because they don't exist as Python
objects, we have to use to manipulate them. This also breaks
the nametowidget method used with Text's peer_names, again because
these widgets don't exist in Python.

Following the inheritance of Text in /Lib/tkinter/
Text > Widget > BaseWidget, where the actual widget creation occurs
with a call to
            (widgetName, self._w) + extra + self._options(cnf))

We cannot smuggle in the tk command '.myoriginaltext peer create' as
a tuple in place of the widgetName ('text') because we end up with the
malformed argument:

((.myoriginaltext, 'peer', 'create'), .peer.path ...)

The attached file is my second attempt, using subclassing.
Lot of code duplication, ugly and not thoroughly tested: I'm hoping a
more elegant solution can be found.
Date User Action Args
2013-05-09 14:36:22ghoulsetrecipients: + ghoul, gpolo
2013-05-09 14:36:22ghoulsetmessageid: <>
2013-05-09 14:36:22ghoullinkissue17945 messages
2013-05-09 14:36:22ghoulcreate