[Tkinter-discuss] tcl/tk's syntax to python's syntax

Rob Ward rl.ward at bigpond.com
Mon Oct 23 05:43:15 EDT 2017

Interesting, I think.

On 23 October 2017 8:27:19 pm AEDT, Michael Lange <klappnase at web.de> wrote:
>On Sun, 22 Oct 2017 21:11:48 +0000
>adil gourinda <rikudou__sennin at live.com> wrote:
>> With the aim to make translation of tcl/tk's syntax to python's
>> more easy I made this flowchart and I ask you to check it.
>> Thanks for your help😊
>I think the translation of the Tk pathName is problematic. One thing
>might come closer could be
>	".parentWidget.childWidget" -> "Instance"
>	".parentWidget" -> "parentWidget"
>But strictly speaking I think this is not correct either. If the Tk
>window is the parent, parentWidget is only "." . If a Frame ".f" is the
>parent, parent widget *is* ".f" in Tk,and a Button widget "b" that is a
>child of ".f" in Tk *is* ".f.b". Of course considering this the chart
>might look a bit pointless, like
>	"parentWidget" -> "parentWidget"
>Actually the widgets' names (as "b" and "f" in the above example) go to
>the widget's "name" option in Python, which is hardly ever used though
>(in Tkinter we usually let Python assign the widget names automatically
>which leads to something that looks like ".1234567890.1234567891"
>of ".f.b").
>I hope this makes some sense, and maybe one of the Tk experts here can
>provide a better explanation.
>Best regards
>.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. .
>It [being a Vulcan] means to adopt a philosophy, a way of life which is
>logical and beneficial.  We cannot disregard that philosophy merely for
>personal gain, no matter how important that gain might be.
>		-- Spock, "Journey to Babel", stardate 3842.4
>Tkinter-discuss mailing list
>Tkinter-discuss at python.org

Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20171023/49766cb5/attachment.html>

More information about the Tkinter-discuss mailing list