Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'startup': 0.05; 'ignored': 0.07; 'level,': 0.07; 'purpose.': 0.07; '__name__': 0.09; 'clause': 0.09; 'subject:using': 0.09; 'gui': 0.12; 'windows': 0.15; 'bits.': 0.16; 'bypassed': 0.16; 'clause.': 0.16; 'omitted.': 0.16; 'skipped': 0.16; 'subject:Tkinter': 0.16; 'subject:skip:m 10': 0.16; 'subject:when': 0.16; 'top-level': 0.16; 'essential': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'examples': 0.20; 'header:User-Agent:1': 0.23; 'looks': 0.24; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'statement': 0.30; "i'm": 0.30; 'code': 0.31; 'explained': 0.31; 'probably': 0.32; 'running': 0.33; 'subject:with': 0.35; "can't": 0.35; 'advice': 0.35; 'but': 0.35; 'should': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'little': 0.38; 'to:addr:python.org': 0.39; 'most': 0.60; 'different': 0.65; 'here': 0.66; 'received:74.208': 0.68; 'saw': 0.77; 'email addr:rocketmail.com': 0.84; 'received:74.208.4.194': 0.84; 'subject:Unwanted': 0.84 Date: Sun, 28 Apr 2013 20:24:22 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Unwanted window spawns when using Tkinter with multiprocessing. References: <7df67006-2176-42cb-a8ce-95a72339e7e2@googlegroups.com> <979db8bf-4d5c-4c7f-8a05-cfade946026f@googlegroups.com> In-Reply-To: <979db8bf-4d5c-4c7f-8a05-cfade946026f@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:q7LC5c79suFGpncKtKUjuLteYp6rc6RCM/c1DdskoSO QrubfbSCfJRT2JSCG0AdYvCB23RxDT8Qi5ssM1OWiU0Romw61a qk33LgLOyZFOw3OMgdgfv35/+dbQHBTkLJKFvXFKTkCANh7OgA OJ8fZGd+Zqbd0qYjOQDQ+gru+y8FSqLSsf5iKaMsuGG+L98viq DI+Ev/WWoufy1x2lGOdUX/jF0xgrpaFwiLNHA9EF5p4TXtbWj/ GTzapjD1kxoc61hwyGMRDDIcXGQ/yM5lYIrw+qUY1JmYR1uHwd zHZ3uzbiP8ioBLjePPUn7NALOsHj9e6EDvN4jy00RtvCUfmng= = 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367195083 news.xs4all.nl 15932 [2001:888:2000:d::a6]:34897 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44481 On 04/28/2013 07:40 PM, alternative00@rocketmail.com wrote: > Well I saw this clause on most of the multiprocessing examples I saw but the reason it was here wasn't explained so I just ignored it (yeah stupid I know). I don't think I bypassed anything, Yes, you skipped the essential if clause. The child process is started with a different __name__. So if the __name__ is not "__main__", then you should NOT call any of the GUI startup code. Probably you should do little or nothing in the top-level code of the child process. But we can't give specific advice without seeing what that code now looks like. What code do you have at top level, and if it calls functions, what do they look like? The way you get that code to be different in the child is with that if statement that you omitted. > at least not on purpose. I'm running on Windows 7 64 bits. > -- DaveA