Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #44481

Re: Unwanted window spawns when using Tkinter with multiprocessing.

Date 2013-04-28 20:24 -0400
From Dave Angel <davea@davea.name>
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>
Newsgroups comp.lang.python
Message-ID <mailman.1143.1367195083.3114.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-28 11:33 -0700
  Re: Unwanted window spawns when using Tkinter with multiprocessing. Dave Angel <davea@davea.name> - 2013-04-28 17:18 -0400
  Re: Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-28 15:23 -0700
    Re: Unwanted window spawns when using Tkinter with multiprocessing. Dave Angel <davea@davea.name> - 2013-04-28 19:10 -0400
  Re: Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-28 16:40 -0700
    Re: Unwanted window spawns when using Tkinter with multiprocessing. Dave Angel <davea@davea.name> - 2013-04-28 20:24 -0400
    Re: Unwanted window spawns when using Tkinter with multiprocessing. Chris Angelico <rosuav@gmail.com> - 2013-04-29 13:03 +1000
  Re: Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-29 08:31 -0700
    Re: Unwanted window spawns when using Tkinter with multiprocessing. MRAB <python@mrabarnett.plus.com> - 2013-04-29 18:03 +0100
  Re: Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-29 10:32 -0700
    Re: Unwanted window spawns when using Tkinter with multiprocessing. Chris Angelico <rosuav@gmail.com> - 2013-04-30 03:45 +1000
  Re: Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-29 11:44 -0700
    Re: Unwanted window spawns when using Tkinter with multiprocessing. Chris Angelico <rosuav@gmail.com> - 2013-04-30 08:00 +1000
  Re: Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-29 18:17 -0700
    Re: Unwanted window spawns when using Tkinter with multiprocessing. Dave Angel <davea@davea.name> - 2013-04-29 22:05 -0400
  Re: Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-30 05:22 -0700
    Re: Unwanted window spawns when using Tkinter with multiprocessing. Dave Angel <d@davea.name> - 2013-04-30 08:30 -0400
  Re: Unwanted window spawns when using Tkinter with multiprocessing. alternative00@rocketmail.com - 2013-04-30 05:31 -0700

csiph-web