Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed6.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.018 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'forcing': 0.07; 'closed,': 0.09; 'kinda': 0.09; 'thinking,': 0.09; 'wed,': 0.12; 'am,': 0.13; 'gui': 0.13; 'wrote:': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'linux': 0.18; 'received:209.85.210.174': 0.19; 'received:mail- iy0-f174.google.com': 0.19; "doesn't": 0.22; 'header:In-Reply- To:1': 0.22; 'gregory': 0.23; 'though.': 0.23; 'obviously': 0.23; '(or': 0.25; 'process,': 0.28; 'message-id:@mail.gmail.com': 0.28; 'around.': 0.29; 'exit': 0.29; 'explicitly': 0.29; 'ewing': 0.30; 'it.': 0.33; 'implement': 0.33; 'actually': 0.33; 'to:addr:python- list': 0.34; 'there': 0.34; 'quite': 0.34; 'running': 0.35; 'primary': 0.36; 'thread': 0.37; 'open': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'steven': 0.38; 'else': 0.38; 'run': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.40; 'closed': 0.62; 'perfectly': 0.64; 'subject:!': 0.67; 'secondary': 0.73; '12:25': 0.84; 'them)': 0.84; 'window,': 0.84 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; bh=bA5RzJCHcQeIT8ZSaMB0QD1/t6fbC2DVgqOMvhsmW3E=; b=oZwxDp29mb9jpN5R9CCe7kq64LVxopv7UheOC5NEw7BtV9g25wR2ZvvFLOvYq/73KX 64iDXn3XWZZ3SWQlSyCvXa6zg+COrYd/tBVpVlvHFBfoH2ttjDfnppda9c2npFf/Iaga 565gmZrzmh9eswaUCnWl72C58SQu2z5ibMV10= MIME-Version: 1.0 In-Reply-To: <4e131ef7$0$29977$c3e8da3$5496439d@news.astraweb.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> Date: Wed, 6 Jul 2011 01:17:30 +1000 Subject: Re: Implicit initialization is EVIL! From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1309879053 news.xs4all.nl 21823 [2001:888:2000:d::a6]:52341 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:8836 On Wed, Jul 6, 2011 at 12:25 AM, Steven D'Aprano wrote: > Gregory Ewing wrote: > >> You've obviously never used a Macintosh. On the Mac, it's >> perfectly normal for an application to open multiple >> documents, each in its own window, with no one window >> being the "main" window. Any of them can be closed (or >> even *all* of them) and the application continues to run >> until you explicitly quit it. > > Or a Linux GUI. I have kwrite running with 15 open windows. The application > doesn't exit until the last window is closed, and no window is privileged > over the others. It's actually quite easy to implement this, even if you _are_ forced to have one primary window. You just have an invisible primary whose sole purpose is to "be the application", and then everything else is secondary windows. Kinda defeats the purpose of forcing applications to have one primary window, though. To my thinking, there will always be one primary *thread*, and GUI facilities are secondary to the process, never the other way around. When the main thread exits, the process ends. ChrisA