Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Error': 0.07; 'bindings': 0.09; 'read-only': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'jan': 0.12; '"global"': 0.16; 'message- id:@4ax.com': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:GUI': 0.16; 'subject:Tkinter': 0.16; 'module': 0.19; 'trying': 0.19; 'replace': 0.24; 'specify': 0.24; 'text.': 0.24; 'url:home': 0.24; 'mon,': 0.24; 'define': 0.26; 'references': 0.26; 'code:': 0.26; 'header:X-Complaints-To:1': 0.27; 'function': 0.29; 'label': 0.30; 'shorter': 0.36; 'charset:us-ascii': 0.36; 'level': 0.37; 'received:76': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'delete': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'full': 0.61; 'email addr:gmail.com': 0.63; 'name': 0.63; 'note:': 0.66; '10:49:07': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Tkinter GUI Error Date: Mon, 13 Jan 2014 20:39:03 -0500 Organization: IISS Elusive Unicorn References: <1ab2aa93-1ba6-48b0-a5f4-5fb05cb523d1@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-76-249-26-39.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389663555 news.xs4all.nl 2892 [2001:888:2000:d::a6]:53288 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63868 On Mon, 13 Jan 2014 10:49:07 -0800 (PST), fluttershy363@gmail.com declaimed the following: > >Inside the function is where I am having the problem, I am trying to get it to delete the label so that it may then replace it with a shorter text. >Here is the full code: > > >global num1 >global num2 >global num3 These do not do what you think they do... "global" is used INSIDE of functions (def) to specify that references to the name on the inside MUST access the module level name. Note: read-only access does not need "global"; only bindings to the name (assignments) have to have the "global" otherwise they define a local name. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/