Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; '(although': 0.05; '(using': 0.05; 'does.': 0.07; 'tkinter': 0.09; 'underlying': 0.09; 'wed,': 0.12; 'am,': 0.13; 'gui': 0.13; 'received:209.85.214.174': 0.13; 'received:mail- iw0-f174.google.com': 0.13; 'wrote:': 0.15; 'closes': 0.16; 'finalize': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hierarchy': 0.16; 'justified': 0.16; 'rantingrick': 0.16; 'reclaim': 0.16; 'windows?': 0.16; 'loading': 0.19; 'help.': 0.19; 'memory': 0.21; '(most': 0.21; 'header:In- Reply-To:1': 0.22; 'libraries': 0.25; 'windows': 0.26; "i'm": 0.27; 'received:209.85.214': 0.28; 'bit': 0.28; 'message- id:@mail.gmail.com': 0.28; 'example': 0.30; 'recreate': 0.30; 'terminate': 0.30; 'chris': 0.32; 'pointing': 0.32; 'programming.': 0.32; 'does': 0.32; 'me?': 0.33; 'to:addr:python- list': 0.34; 'instead': 0.34; 'fail': 0.34; 'possible,': 0.34; 'explicit': 0.35; 'equal': 0.35; 'hold': 0.36; 'good.': 0.37; 'open': 0.37; 'some': 0.37; 'model': 0.37; 'but': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'user': 0.38; 'subject:: ': 0.38; 'too,': 0.38; "there's": 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.40; 'did': 0.40; 'your': 0.60; 'basis': 0.62; 'manager,': 0.62; 'free': 0.63; 'harder': 0.64; 'subject:!': 0.67; 'exact': 0.69; 'superior': 0.74; 'claim': 0.77; 'claims': 0.82; 'yours': 0.84; 'happy.': 0.84; 'rinse': 0.84; 'thumbs': 0.84; 'window,': 0.84; '*to': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=q2OHQD0WEIHWDQuj1yNaqYFUV3lQv/7Ns975QSlyX5c=; b=qkQXOQLwh/qNRJxTG8UmsuoByyaInNvgvSbzLbieuIm3lbg5OQZkQqTFYoybeY+mMN NqHJfVi8IE8H9zfOrBikKK0N3SGiiEzABorudInjz7Eq7Y8Eh9pS73jmT62KXyXOmFDe y8M59Jlhp54E86yvRI1m+32Czvcbt7duPTAMI= MIME-Version: 1.0 In-Reply-To: <48efc27f-7dc7-4980-a00a-74f42670c683@fv14g2000vbb.googlegroups.com> References: <97dc7iF9eiU1@mid.individual.net> <78624344-9696-42c9-9ed8-9454c55c1d9f@g12g2000yqd.googlegroups.com> <97ga0jFq2lU1@mid.individual.net> <4e131ef7$0$29977$c3e8da3$5496439d@news.astraweb.com> <4e133509$0$12858$426a74cc@news.free.fr> <999dd05c-cae5-4c86-8ee7-6e1d6116d2ed@gh5g2000vbb.googlegroups.com> <8e2cfeb0-ddbd-4cb5-ac88-91cc53394ac6@d7g2000vbv.googlegroups.com> <48efc27f-7dc7-4980-a00a-74f42670c683@fv14g2000vbb.googlegroups.com> Date: Wed, 6 Jul 2011 10:34:08 +1000 Subject: Re: Implicit initialization is EVIL! From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 45 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1309912450 news.xs4all.nl 21791 [2001:888:2000:d::a6]:55646 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:8880 On Wed, Jul 6, 2011 at 10:15 AM, rantingrick wrote: > On Jul 5, 6:54=A0pm, Chris Angelico wrote: > >> To do what for me? Close windows? Reclaim memory? Terminate >> applications? I don't understand your bogglement. > > ClaimA: I made claim that Tkinter's window hierarchy is not only > normal, but justified in modern GUI programming. > > ClaimB: You made a claim ( or supported a rebuttal claim) that Mac's > system of window management was superior and did not need such a > "window hierarchy" simply because; I never said "better". I just said that it's possible to create an application that *to the user* has no main window, even though *to the system* it does. And I'm also pointing out that in most good toolkits, there's no "main window", but instead a "main thread". > 1. You can create a program that twiddles it's thumbs (using very > little memory) until a message is received. > 2. Upon receiving a message the program can open a GUI window. > 3. When the user closes the GUI window (definition of "close" is not > nailed down yet!) the program will free the GUI memory and start > twiddling it's thumbs again until the next message arrives. > 4. rinse and repeat until you are happy. Again, pointing out that it's possible, not that it's good. (Most messenger programs will have a means of *sending* messages too, which makes a good basis for a main window.) It's not efficient to keep loading up GUI libraries and discarding them again. But it's possible, and it would mean that you genuinely have multiple equal main windows. > It's obvious that yours and my claims are contradicting. So with that > said, at what point does Tkinter or Windows fail in this example you > provide? Because, i can recreate the exact same functionality on a > windows box without need of the underlying window manager's help. Actually, everything you do requires the underlying window manager, otherwise you're just painting your own pixels on the screen. And I never said that this model was possible in some and not others. (Although it's a bit harder with Windows; there's no explicit call to finalize windowing, so most likely the application will hold GUI memory until termination.) ChrisA