Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Terry Reedy Newsgroups: comp.lang.python Subject: Re: Change Windows Tkinter after some time Date: Sun, 10 Apr 2016 15:13:25 -0400 Lines: 32 Message-ID: References: <1a13aefe-c66e-412a-8e9d-9afb684153d4@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de ga7EW5qJryYeyWJCi5IUNgKh3cvShUjJAUsJ0uCsR39g== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'essentially': 0.04; 'subject:Windows': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'jan': 0.11; 'suggest': 0.15; 'lambda': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'subject:Change': 0.16; 'subject:Tkinter': 0.16; 'subject:after': 0.16; 'wrote:': 0.16; 'integer': 0.18; 'windows': 0.20; 'posted': 0.21; 'saying': 0.22; 'button,': 0.22; 'complete,': 0.22; 'parameter': 0.22; 'am,': 0.23; 'code.': 0.23; 'bit': 0.23; 'ignored.': 0.23; 'tried': 0.24; 'written': 0.24; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'command': 0.26; 'header:X-Complaints-To:1': 0.26; 'this.': 0.28; 'initial': 0.28; 'subject:some': 0.29; 'windows,': 0.29; 'there.': 0.30; 'work.': 0.30; 'code': 0.30; 'problem': 0.33; 'trouble': 0.35; 'subject:time': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'thought': 0.37; 'stuff': 0.38; 'to:addr:python.org': 0.40; 'some': 0.40; 'questions': 0.40; 'your': 0.60; 'making': 0.62; 'received:96': 0.63; 'hours': 0.65; 'between': 0.65; 'believe': 0.66; 'url:help': 0.73; 'click': 0.76; '9:36': 0.84; 'diego': 0.84; 'irrelevant': 0.84; '"how': 0.91; 'received:fios.verizon.net': 0.91; 'urge': 0.91 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: pool-96-227-207-81.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <1a13aefe-c66e-412a-8e9d-9afb684153d4@googlegroups.com> Xref: csiph.com comp.lang.python:106797 On 4/10/2016 2:11 PM, Terry Reedy wrote: > On 4/10/2016 9:36 AM, Diego Lelis wrote: >> I need to make a change between windows, after some time. But i am >> have a little bit of trouble making my code work: My windows change >> only when i click on button, i tried to put lambda in my command and >> also don't work. > > I and others have written multiple answers on Stackoverflow about making > root.after work. I suggest that you search "[tkinter] root.after" there. > > [snip somewhat baroque code] > > I urge you to read SO's "How to create a Minimal, Complete, and > Verifiable example" https://stackoverflow.com/help/mcve > This not only helps you write questions that get answers, but may help > you find the problem yourself. > > I believe that all the stuff with .now and datetime deltas is > inessential noise. The initial parameter to .after is a integer > millisecond delta. All the font stuff is irrelevant to the problem, so > is some other stuff in your code. > > I think you problem is that you never call root.after to start the > process going. I see you also posted on SO and got essentially the same answer 4 hours before I wasted my time saying the same thing because I thought you had been ignored. Please don't do this. -- Terry Jan Reedy