Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'bug': 0.02; 'string.': 0.04; 'attribute': 0.07; 'received:verizon.net': 0.07; 'subject:when': 0.07; 'terry': 0.07; 'version?': 0.07; '"hello': 0.09; 'braces': 0.09; 'presume': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'tuple': 0.09; 'comma': 0.16; 'expected,': 0.16; 'reedy': 0.16; 'solves': 0.16; 'spurious': 0.16; 'subject:() ': 0.16; 'subject:GUI': 0.16; 'subject:app': 0.16; 'subject:writing': 0.16; 'three.': 0.16; 'wrote:': 0.18; 'jan': 0.19; 'appropriate': 0.22; 'header:In-Reply-To:1': 0.22; 'end,': 0.23; 'happening': 0.24; 'handles': 0.25; 'saying': 0.26; 'separate': 0.28; 'problem': 0.29; 'pm,': 0.29; 'equivalent.': 0.30; 'item,': 0.30; 'subject:?': 0.31; 'header:User-Agent:1': 0.33; 'instead': 0.33; 'header:X-Complaints-To:1': 0.34; 'rather': 0.34; 'problem.': 0.35; 'to:addr:python-list': 0.35; 'skip:" 20': 0.35; 'received:org': 0.36; 'but': 0.37; 'another': 0.37; 'subject:with': 0.37; 'uses': 0.38; 'change': 0.40; 'to:addr:python.org': 0.40; 'your': 0.61; 'world': 0.61; 'believe': 0.65; 'manner': 0.65; 'spaces': 0.73; '10:43': 0.84; 'subject:necessary': 0.84; 'items,': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Is it necessary to call Tk() when writing a GUI app with Tkinter? Date: Fri, 02 Mar 2012 15:19:31 -0500 References: <27603449.17.1330492001624.JavaMail.geo-discussion-forums@vbbfv2> <6e1c521e-14be-4ec0-9ff0-7f23fd9cd3dc@f14g2000yqe.googlegroups.com> <3d0bf288-fa5d-48e5-9529-db92d420a915@1g2000yqv.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-74-109-121-73.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1330719597 news.xs4all.nl 6880 [2001:888:2000:d::a6]:52389 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21146 On 3/1/2012 10:43 PM, Terry Reedy wrote: >> Not sure what is happening on your end, but i don't see any braces. > > Are you saying that if you change "Hello_World\n(click_me)" to > "Hello World\n(click me)", you see > > Hello World > (click me) > > as I expected, instead of > > {Hellow World > (click me)} > > as I do see? What OS are you running? And what tk version? (I have 8.5.9 > in Win7) The problem was another subtle bug in the current example": self.hi_there["text"] = "Hello", The spurious comma at the end makes the value of the 'text' attribute a one-elememt tuple and not just a string. I presume tcl-based tk handles that in the manner appropriate for the tcl equivalent. I believe tcl uses spaces rather than commas to separate items, so the braces serve as 'quotes' to indicate that the contents are one item, not three. Removing the comma solves the problem. -- Terry Jan Reedy