title: Using `event_generate` when tkinter runs in a new thread
body: <p>I need to generate virtual events for a tkinter window running in a separate thread. Calling <code>event_generate</code> from non-gui thread is supposed to be safe and it works well, when tkinter runs in the main thread and events are generated in another thread. </p>
  
  <p>For a certain reason I need that the statements generating the events run in main thread (more specifically, I want those statements to be in the toplevel of the module). </p>
  
  <p>But, when I do <code>root = Tk(); root.mainloop()</code> in a new thread and <code>root.event_generate("&lt;&lt;my-event&gt;&gt;")</code> in the main thread, I get stack overflow. When I swap the threads (<code>root = Tk(); root.mainloop()</code> in the main thread and <code>root.event_generate("&lt;&lt;my-event&gt;&gt;")</code> in a new thread) then everything works again.</p>
  
  <p>I have taken care that root is fully construted (and also idle), before I try generating the event. </p>
  
  <p>Any ideas how to get this setup working?</p>
  
  <p>(I'm using Python 3.2.3)</p>