Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'context': 0.07; 'responding': 0.07; '"__main__":': 0.09; '__name__': 0.09; 'english,': 0.09; 'function,': 0.09; 'subject:using': 0.09; 'thread': 0.14; 'posted': 0.15; 'key)': 0.16; 'margin': 0.16; 'op.': 0.16; 'subject:Tkinter': 0.16; 'subject:skip:m 10': 0.16; 'subject:when': 0.16; 'tk()': 0.16; 'variables,': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'module': 0.19; 'code,': 0.22; 'import': 0.22; 'header:User-Agent:1': 0.23; 'script.': 0.24; 'earlier': 0.24; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'code': 0.31; 'lines': 0.31; "skip:' 10": 0.31; 'about.': 0.31; 'apparently': 0.31; 'file': 0.32; 'run': 0.32; 'whom': 0.33; 'not.': 0.33; 'skip:# 10': 0.33; 'subject:with': 0.35; 'except': 0.35; 'but': 0.35; 'replies': 0.36; 'so,': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'little': 0.38; 'expect': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; "you're": 0.61; "you've": 0.63; 'talking': 0.65; 'received:74.208': 0.68; 'therefore': 0.72; 'to,': 0.72; "'if": 0.84; 'email addr:rocketmail.com': 0.84; 'received:74.208.4.194': 0.84; 'subject:Unwanted': 0.84 Date: Mon, 29 Apr 2013 22:05:17 -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> <9d19b7ba-29c2-40f8-a7f5-95e56d75e6a9@googlegroups.com> In-Reply-To: <9d19b7ba-29c2-40f8-a7f5-95e56d75e6a9@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:xl2Xg86015Ry+cn4BojkkGrParbz0ht3uNoNBS2CABp ZtsYl3VNnTgs6FIuZPMETWr9ZUT4vefeYaJdO7zBxh7gFF0ZlL irhY8ZkEu5hMg8K7/OdmCzdeXYqsdqo9r7ElgtoNu8IOEW6VNK 9upI6fs8j2viFOIy+78uIO2e0BCcTs3Tk544xr6j3omi1c9Swm Vq9TAndSExn7eGsj9aIT3JvObi3GpXRX0GeH9rbiRM2gr0Ct14 W7LcyWv+/CEyue/cAG9tC0JRI2N0mdxHAVQwcJQm5agMdzIqOF CWzop8k/2nHGshasRK/qbk5GYNLUrlYYYXiK+7WPKqeNM8Odg= = 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: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367287546 news.xs4all.nl 15870 [2001:888:2000:d::a6]:55192 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44532 On 04/29/2013 09:17 PM, alternative00@rocketmail.com wrote: > I thought 'clause' was reffering to the 'if __name__ == "__main__":' thing in English, but apparently not. > Well except the import and the 'globalization' of my variables, every thing is idented. > No clue whom you think you're replying to, but all your replies so far are appearing in the thread as replies to your OP. Please use a little context from the message you think you're responding to, so we have an idea what you're talking about. Did you ever see MRAB's message, where he told you exactly what the change requested was? if __name__ == "__main__": # This part will be run if the file is run as the main script. # # The multiprocessing module will import this file to run the # "player" function, but __name__ won't be "__main__" when it does # so, therefore this bit of code won't be run. #Initialisation fenetre = Tk() frame = Frame(fenetre, width=200, height=100) instance = 'Instance' #TK frame.focus_set() frame.bind("", key) frame.pack() fenetre.mainloop() All of those lines were at the left margin in your earlier posted code, and you give us no reason to expect you've made them conditional. -- DaveA